Exemple #1
0
        static void FluentObject()
        {
            PersonList People = new PersonList()
            {
                new Person(){ name="Bentley", birthDate=new DateTime(1963, 3, 7)},
                new Person(){ name="Christy", birthDate=new DateTime(1973, 9, 19)},
                new Person(){ name="Benjamin", birthDate=new DateTime(2001, 9, 19)}
            };

            PersonList q = People.Name().StartsWith("B").BirthDate().Greater(new DateTime(2000,1,1));
            foreach (Person p in q)
            {
                Console.WriteLine(p.name);
            }
        }