static void Main(string[] args) { // getter, setter 사용 Person_GetSet p1 = new Person_GetSet(); p1.SetName("이동윤"); Console.WriteLine(p1.GetName()); // properties 사용 Person_Properties p2 = new Person_Properties(); p2.Name = "이동윤"; Console.WriteLine(p2.Name); }
public static void Main(string[] args) { Person_GetSet p1 = new Person_GetSet(); p1.SetName("장만월"); Console.WriteLine(p1.GetName()); Person_Prop p2 = new Person_Prop(); p2.Name = "아이유"; Console.WriteLine(p2.Name); int[] nums = new int[5]; }