// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Collections.Generic; using System.Linq; namespace E { public class Program { public static void Main(string[] args) { List a = new List { 1, 2 }; List b = a.Concat(new List { 3, 4 }).ToList(); Console.WriteLine(string.Join(",", b.Select(v => v.ToString()).ToArray())); int[] c = { 1, 2 }; int[] d = c.Concat(new int[] { 3, 4 }).ToArray(); Console.WriteLine(string.Join(",", b.Select(v => v.ToString()).ToArray())); } } }