static void Person_3() { IPerson person = new Rach(); APersonDecorator decorator = new Kajol(person); //person = new Lipstick(person); Console.WriteLine(decorator.Name()); Console.WriteLine("Age: " + decorator.Age()); }
static void Person_4() { IPerson person = new Rach(); person = new Kajol(person); person = new Lipstick(person); person = new EyeLiner(person); Console.WriteLine(person.Name()); Console.WriteLine("Age: " + person.Age()); }