예제 #1
0
파일: Program.cs 프로젝트: Valen-Tine/Names
        static void Main(string[] args)
        {
            Person person = new Person();

            person.ChangeFirstName(1999, "Helen");
            person.ChangeLastName(2001, "Kot");
            person.ChangeFirstName(2004, "Ruby");
            person.ChangeLastName(2005, "Krets");

            for (int i = 1996; i < 2006; i++)
            {
                person.GetFullName(i);
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            Person p1 = new Person("Sam", "Newton", "16/06/1996", 183);
            Person p2 = new Person("Jordan", "Cadzow", "29/05/2001", 180);
            Person p3 = new Person("Killmaim", "Deathstab", "1/01/2020", 143);

            Console.WriteLine(p1.GetFullName());
            Console.WriteLine(p2.GetFullName());
            Console.WriteLine(p3.GetFullName());

            Console.WriteLine(p1.GetHeightDifference(p2));
            Console.WriteLine(p1.GetHeightDifference(p3));
            Console.WriteLine(p2.GetHeightDifference(p3));
        }