public class Empty_LINQ { public static void Empty_Print() { string[] name1 = { "Asfs", "Steve" }; string[] name2 = { "Joe", "Jhon", "Sawyer", "Sayid" }; string[] name3 = { "Dave", "Kate", "Juliet", "Sara" }; List<string[]> names = new List<string[]> { name1, name2, name3 }; IEnumerable<string> nameList = names.Aggregate(Enumerable.Empty<string>(), (current, next) => next.Length > 2 ? current.Union(next) : current); foreach (string s in nameList) { Console.WriteLine(s); } } public static void Range_Print() { foreach (var item in Enumerable.Range(1,10)) { Console.WriteLine(item.ToString()); } foreach (var item in Enumerable.Range(1, 10).Reverse()) { Console.WriteLine(item.ToString()); } foreach (var item in Enumerable.Range(1, 5).Select(x => x * 5)) { Console.WriteLine(item.ToString()); } } public static void Repeat_Print() { foreach (var item in Enumerable.Repeat("I love you",3)) { Console.WriteLine(item.ToString()); } } }