예제 #1
0
        static void Main(string[] args)
        {
            NameCard MyCard = new NameCard();

            MyCard.Name = "상현";
            MyCard.Age  = 24;

            Console.WriteLine($"Name:{MyCard.Name}");
            Console.WriteLine($"Age:{MyCard.Age}");
        }
예제 #2
0
        static void Main(string[] args)
        {
            NameCard MyCard = new NameCard();

            MyCard.SetAge  = 24;
            MyCard.SetName = "상현";

            Console.WriteLine("나이 : {0}", MyCard.GetAge);
            Console.WriteLine("이름 : {0}", MyCard.GetName);
        }