Exemple #1
0
        static void Main()
        {
            string         city     = "chennai";
            List <Student> students = new List <Student>();

            students.Add(new Student(null, 1001, 30));
            students.Add(new Student("abhi", 1002, 24));
            students.Add(new Student("Raju", 1003, 25));
            BusinessLayer businessLayer = new BusinessLayer();

            businessLayer.Displaycity(city);
            businessLayer.DisplayStudentDetails(students);
            Console.Read();
        }
Exemple #2
0
        static void Main()
        {
            string city = "Chennai";

            List <Student> students = new List <Student>();

            students.Add(new Student("HArsh", 101, 22));
            students.Add(new Student(null, 102, 23));

            BusinessLayer businessLayer = new BusinessLayer();

            businessLayer.Displaycity(city);
            businessLayer.DisplayStudentDetails(students);


            /* foreach(Student s in students)
             * {
             *  // Console.WriteLine(s.name + " " + s.id + " " + s.age);
             *   Console.WriteLine("Id : {0} || Name : {1} || Age : {2}", s.id, s.name, s.age);
             * }*/

            Console.Read();
        }