static void Main(string[] args) { Console.WriteLine("-------abstraction-------"); //car class abstraction VehicleA h = new VehicleA(); h.Brand = "Hyundai"; h.Color = "Green"; h.Price = 12000; h.CarDetails(); Console.WriteLine("-------inheritance-------"); //car class inheritance Car m = new Car(); m.Brand = "Mercedes"; m.Color = "white"; m.Price = 19000; m.VehicleDetails(); Console.WriteLine("-------------------------"); //truck class inheritance Truck v = new Truck(); v.Brand = "volvo"; v.Color = "black"; v.Price = 32000; v.Weight = 42000; v.TruckDetails(); Console.WriteLine("------polymorphism-------"); CarP s = new CarP(); TruckP n = new TruckP(); s.Break(); n.Break(); }
public static PropertyKey A(this CarP p) => PropertyKeyMapper.GetA(p);