コード例 #1
0
 static void Main(string[] args)
 {
     Console.WriteLine("Hello World!");
     Firearm pistol = new Firearm { name = "pistol", sound = "pop", caliber = "9mm" };
     pistol.work();
     Firearm rifle = new Firearm { name = "rifle", sound = "bang", caliber = "7.62mm" };
     rifle.work();
     Firearm shotgun = new Firearm { name = "shotgun", sound = "boom", caliber = "12gauge" };
     shotgun.work();
 }