Exemple #1
0
        static void Main(string[] args)
        {
            var studentCatalog = new StudentCatalog
            {
                catalog = new List <Student>()
                {
                    new Student {
                        BoosterId = 123456, FirstName = "Jean", LastName = "Jean"
                    },
                    new Student {
                        BoosterId = 654321, FirstName = "Pierre", LastName = "Curie"
                    },
                    new Student {
                        BoosterId = 123571, FirstName = "Marie", LastName = "Madeleine"
                    },
                    new Student {
                        BoosterId = 175321, FirstName = "Marco", LastName = "Polo"
                    },
                    new Student {
                        BoosterId = 123571, FirstName = "Albert", LastName = "Einstein"
                    }
                }
            };


            //var result = studentCatalog.GetFullName(654321);
            //var result = studentCatalog.GetLastThree();
            var result = studentCatalog.Search("stein");

            Console.ReadLine();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            var studentCatalog = new StudentCatalog
            {
                catalog = new List<Student>()
                {
                    new Student {BoosterId=123456, FirstName="Jean",LastName="Jean" },
                    new Student {BoosterId=654321, FirstName="Pierre", LastName="Curie" },
                    new Student {BoosterId=123571, FirstName="Marie", LastName="Madeleine" },
                    new Student {BoosterId=175321, FirstName="Marco", LastName="Polo" },
                    new Student {BoosterId=123571, FirstName="Albert", LastName="Einstein" }
                }
            };

            //var result = studentCatalog.GetFullName(654321);
            //var result = studentCatalog.GetLastThree();
            var result = studentCatalog.Search("stein");

            Console.ReadLine();
        }