コード例 #1
0
        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));
            }
        }
コード例 #2
0
        static void Main(string[] args)
        {
            MySpecialCollection collection = new MySpecialCollection();

            collection = new MySpecialCollection();
            Console.WriteLine(collection);
            Console.WriteLine(collection.LongerThanFiveElements());
            Console.ReadLine();
            Console.ReadLine();
        }