namespace DecoratorPattern
public virtual void CarType()
Console.WriteLine("Simple Car ");
public class WithAC : Car
public override void CarType()
Console.Write("AC Car ");
public class WithSoundSystemAndAC : WithAC
public override void CarType()
Console.WriteLine("With Sound system");
public class WithSoundSystem : Car
public override void CarType()
Console.Write("Car with only sound system");
public static void Main(string[] args)
Car objCarAC = new WithAC();
Car objCarAll = new WithSoundSystemAndAC();