// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; using System.Collections.Generic; public class Program { public static void Main(string[] args) { int[] arr1 = new int[] { 1, 2, 3 }; int[] arr2 = new int[] { 4, 5, 6 }; int[] arr3 = new int[arr1.Length + arr2.Length]; Array.Copy(arr1, 0, arr3, 0, arr1.Length); Array.Copy(arr2, 0, arr3, arr1.Length, arr2.Length); foreach(int v in arr3) Console.Write(" {0}", v); Console.WriteLine(); List lst1 = new List { 1, 2, 3 }; List lst2 = new List { 4, 5, 6 }; List lst3 = new List(); lst3.AddRange(lst1); lst3.AddRange(lst2); foreach(int v in lst3) Console.Write(" {0}", v); Console.WriteLine(); } }