static void Main(string[] args) { computer comp1 = new computer("Dell", "Usa"); laptop lap1 = new laptop("Dell", "Usa", "Inspirion", "Red"); desktop desk1 = new desktop("Dell", "USA", "FOLL", "Blue"); Console.WriteLine(comp1.ToString()); Console.WriteLine(lap1.ToString()); Console.WriteLine(desk1.ToString()); Console.ReadLine(); }
static void Main(string[] args) { computer comp1 = new computer("Dell", "Usa"); Laptop lap1 = new Laptop("Dell", "USA", "Inspiron", "Blue"); Desktop desk1 = new Desktop("Dell", "USA", "XPS", "Red"); Console.WriteLine(comp1.Format()); Console.WriteLine(lap1.FormatLaptop()); Console.WriteLine(desk1.FormatDesk()); Console.ReadLine(); }