Пример #1
0
        static void Main(string[] args)
        {
            BirthdayInfo birth = new BirthdayInfo();

            birth.Name     = "서현";
            birth.Birthday = new DateTime(1991, 6, 28);

            Console.WriteLine($"Name : {birth.Name}");
            Console.WriteLine($"Birthday : {birth.Birthday.ToShortDateString()}");
            Console.WriteLine($"Age : {birth.Age}");
        }
Пример #2
0
        static void Main(string[] args)
        {
            BirthdayInfo birth = new BirthdayInfo() // ,자로 나눈다. 인텔리전스로 자동완성되는거 너무 편해
            {
                Name     = "서현",
                Birthday = new DateTime(1991, 6, 28)
            };

            Console.WriteLine($"Name : {birth.Name}");
            Console.WriteLine($"Birthday : {birth.Birthday.ToShortDateString()}");
            Console.WriteLine($"Age : {birth.Age}");
        }