Beispiel #1
0
        static void Main(string[] args)
        {
            var calculator = new Calculator();

            Console.WriteLine(calculator.CubeEvenNumbers(4));

            var dto = new StudentDTO
            {
                Location = "Mumbai",
                Name     = "Akash"
            };

            var dto2 = new StudentDTO
            {
                Location = "Mumbai",
                Name     = "Brijesh"
            };

            var dto3 = new StudentDTO
            {
                Location = "Mumbai",
                Name     = "Raaj"
            };

            Console.WriteLine(dto.Id);
            Console.WriteLine(dto.ToString());
            Console.WriteLine(dto2);
            Console.WriteLine(dto3);
            Console.WriteLine(dto.Id);
            Console.WriteLine(dto.GetType());
            Console.WriteLine(dto.GetHashCode());
            Console.WriteLine(dto2.GetHashCode());
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Calculator calculator = new Calculator();
            //Console.WriteLine(calculator.CubeEvenNum(10));

            var dto = new StudentDTO {
                Location = "Mumbai", Name = "Briijesh"
            };

            //Console.WriteLine(dto);
            Console.WriteLine(dto.ToString());
            Console.WriteLine(dto.GetType());
            Console.WriteLine(dto.GetHashCode());

            var dto1 = new StudentDTO {
                Location = "Ahmedabd", Name = "Akash"
            };

            Console.WriteLine(dto1);
            Console.WriteLine(dto1.ToString());

            Console.WriteLine(dto);
        }