Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Write name: ");
            string name = Console.ReadLine();

            Console.WriteLine("Write ID: ");          //Вывод данных студента
            string id = Console.ReadLine();

            Console.WriteLine("Write year of study: ");
            string num = Console.ReadLine();
            int    yearofstudy;

            yearofstudy = int.Parse(num);
            Student student = new Student(name, id); // конструктор

            Console.WriteLine("Next Year of study: " + student.Nextyear(yearofstudy));
            Console.ReadKey();
        }