// 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) { List lst = new List { 2, 3 }; if(lst.SequenceEqual(new List { 1, 2 })) { Console.WriteLine("1,2"); } else if(lst.SequenceEqual(new List { 2, 3 })) { Console.WriteLine("2,3"); } else if(lst.SequenceEqual(new List { 3, 4 })) { Console.WriteLine("3,4"); } } }