static void Main(string[] args)
 {
     Console.WriteLine("Person--Student--ExStudent: ");
     Console.WriteLine();
     Person person1 = new Person("Vasia",26);
     Person person2 = new Person("Petia", 25);
     person1.ShowInfo();
     person2.ShowInfo();
     Person person3 = new Student("Vasia", 26,"BSU");
     Person person4 = new Student("Petia", 25, "BrSU");
     Console.WriteLine();
     person3.ShowInfo();
     person4.ShowInfo();
     Person person5 = new ExStudent("Vasia", 26, "BSU", "Brest");
     Person person6 = new ExStudent("Petia", 25, "BrSU", "Minsk");
     Console.WriteLine();
     person5.ShowInfo();
     person6.ShowInfo();
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Person--Student--ExStudent: ");
            Console.WriteLine();
            Person person1 = new Person("Vasia", 26);
            Person person2 = new Person("Petia", 25);

            person1.ShowInfo();
            person2.ShowInfo();
            Person person3 = new Student("Vasia", 26, "BSU");
            Person person4 = new Student("Petia", 25, "BrSU");

            Console.WriteLine();
            person3.ShowInfo();
            person4.ShowInfo();
            Person person5 = new ExStudent("Vasia", 26, "BSU", "Brest");
            Person person6 = new ExStudent("Petia", 25, "BrSU", "Minsk");

            Console.WriteLine();
            person5.ShowInfo();
            person6.ShowInfo();
        }