elena1234

How to merge two arrays

Dec 4th, 2021
1,054
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Linq;
  2.  
  3. namespace ConcatTwoArrays
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int[] front = { 1, 2, 3, 4 };
  10.             int[] back = { 5, 6, 7, 8 };
  11.             int[] combined = front.Concat(back).ToArray();
  12.         }
  13.     }
  14. }
  15.  
RAW Paste Data