private static void LikeSql(MySpecialCollection collection) { var anotherFilter = from e in collection where e.Weight % 2 == 1 select e; foreach (var e in anotherFilter) { Console.WriteLine(string.Format("s[{0}]", e.Weight)); } }
static void Main(string[] args) { MySpecialCollection collection = new MySpecialCollection(); collection = new MySpecialCollection(); Console.WriteLine(collection); Console.WriteLine(collection.LongerThanFiveElements()); Console.ReadLine(); Console.ReadLine(); }