static void Constructor() { WriteLine("\nConstructor()"); CatA kitty = new CatA("노루", "황색"); kitty.Meow(); WriteLine($"{kitty.Name} : {kitty.Color}"); CatA nero = new CatA("미로", "흰검색"); nero.Meow(); WriteLine($"{nero.Name} : {nero.Color}"); }
static void BasicClass() { WriteLine("BasicCLass()"); CatA kitty = new CatA(); kitty.Color = "하얀색"; kitty.Name = "키티"; kitty.Meow(); WriteLine($"{kitty.Name} : {kitty.Color}"); CatA nero = new CatA(); nero.Color = "검정색"; nero.Name = "네로"; nero.Meow(); WriteLine($"{nero.Name} : {nero.Color}"); }