示例#1
0
        public static void TestEquals()
        {
            var test = new StudentAssembly.Models.Student
            {
                FirstName  = "a",
                MiddleName = "b",
            };

            var test1 = new StudentAssembly.Models.Student
            {
                FirstName  = "a",
                MiddleName = "b"
            };

            Console.WriteLine(test.ToString());
            Console.WriteLine(test1.ToString());

            Console.WriteLine(test.Equals(test1));
        }
示例#2
0
        public static void TestEquals()
        {
            var test = new StudentAssembly.Models.Student
            {
                FirstName = "a",
                MiddleName = "b",
            };

            var test1 = new StudentAssembly.Models.Student
            {
                FirstName = "a",
                MiddleName = "b"
            };

            Console.WriteLine(test.ToString());
            Console.WriteLine(test1.ToString());

            Console.WriteLine(test.Equals(test1));
        }
示例#3
0
        public static void TestClone()
        {
            var test = new StudentAssembly.Models.Student
            {
                FirstName = "a",
                MiddleName = "b",
                LastName = "mahalalov",
                Email = "*****@*****.**",
                Faculty = FacultyType.Law
            };

            var test1 = (StudentAssembly.Models.Student)test.Clone();

            Console.WriteLine(test.ToString());
            Console.WriteLine(test1.ToString());
            Console.WriteLine(test.Equals(test1));
            Console.WriteLine(test.GetHashCode());
            Console.WriteLine(test1.GetHashCode());
        }
示例#4
0
        public static void TestClone()
        {
            var test = new StudentAssembly.Models.Student
            {
                FirstName  = "George",
                MiddleName = "Brown",
                LastName   = "Topalov",
                Email      = "*****@*****.**",
                Faculty    = FacultyType.Law
            };

            var test1 = (StudentAssembly.Models.Student)test.Clone();


            Console.WriteLine(test.ToString());
            Console.WriteLine(test1.ToString());
            Console.WriteLine(test.Equals(test1));
            Console.WriteLine(test.GetHashCode());
            Console.WriteLine(test1.GetHashCode());
        }
示例#5
0
        public static void TestClone()
        {
            var test = new StudentAssembly.Models.Student
            {
                FirstName  = "a",
                MiddleName = "b",
                LastName   = "mahalalov",
                Email      = "*****@*****.**",
                Faculty    = FacultyType.Law
            };

            var test1 = (StudentAssembly.Models.Student)test.Clone();


            Console.WriteLine(test.ToString());
            Console.WriteLine(test1.ToString());
            Console.WriteLine(test.Equals(test1));
            Console.WriteLine(test.GetHashCode());
            Console.WriteLine(test1.GetHashCode());
        }