static void Main() { ICar car = new Benz(); car.Break(); car.Engine(); car = new Toyota(); car.Break(); car.Engine(); car = new Maruti(); car.Break(); car.Engine(); Benz Bcar = new Benz(); Bcar.BenzFunctionality(); Toyota Tcar = new Toyota(); Tcar.ToyotaFunctionality(); Console.Read(); }
static void Main(string[] args) { Maruti obj1 = new Maruti("abc", "petrol", "123"); Mahindra obj2 = new Mahindra("pqr", "disel", "456"); Console.ReadKey(); }
static void Main(string[] args) { // Car car = new Car(); Maruti maruti = new Maruti("petrol", "1", "maruti"); Mahindra mahindra = new Mahindra("diesel", "2", "mahindra"); Console.ReadKey(); }
public static void Main(string[] args) { Maruti myCar = new Maruti(); myCar.model = "Alto"; myCar.color = "White"; myCar.price = 10000000; myCar.mileage = 22.5f; myCar.PrintCarInformation(); myCar.printMileage(); Console.ReadLine(); }