コード例 #1
0
ファイル: Program.cs プロジェクト: vstoyanov88/TelerikAcademy
        static void Main()
        {
            Student student1 = new Student("Pesho", "Pehsev", "Peshev", 12345, "Sofia",
                89765223, "*****@*****.**", University.SU, Faculty.finance, Specialty.finance);
            Student student2 = new Student("Pesho", "Peshev", "Peshev", 54331, "Sofia",
                7432487, "*****@*****.**", University.TU, Faculty.IT, Specialty.IT);
            Console.WriteLine(student1);
            Console.WriteLine();
            Console.WriteLine(student2);
            Console.WriteLine(student1 != student2);
            Console.WriteLine(student1 == student2);
            Console.WriteLine(student1.GetHashCode());
            Console.WriteLine();

            Student student3 = (Student)student1.Clone();
            Console.WriteLine(student3);
            Console.WriteLine(student1.ComparerTo(student2));
            Console.WriteLine(student1.ComparerTo(student3));
        }