static void Main(string[] args) { var car = new Automobile() { Make = "Toyota", Model = "4Runer", Year = 2010 }; //car.Display(); Print(car); Console.ReadLine(); var suv = new SUV() { Make = "GMC", Model = "Yukon", Year = 2013, DriveMechanism = "4 wheel drive" }; //suv.Display(); Print(suv); Console.ReadLine(); }
private static void Print(Automobile auto) { auto.Display(); }