static void Main(string[] args) { car myCar = new car(); myCar.Make = "BMW"; myCar.Model = "745li"; myCar.colour = "Black"; myCar.Year = 2005; truck myTruck = new truck(); myTruck.Make = "Ford"; myTruck.Model = "F950"; myTruck.Year = 2006; myTruck.colour = "black"; myTruck.towingCapacity = 1200; printCarDetails(myTruck); printCarDetails(myCar); Console.ReadLine(); }
private static void printCarDetails(car car) { Console.WriteLine("Here are your car details: {0}", car.FormatMe()); }