Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Undecorated {
- public void Method1() {
- Console.WriteLine("Undecorated");
- }
- }
- class Decorated : Undecorated {
- Undecorated u { get; set; }
- public void Method1() {
- u.Method1();
- Console.WriteLine("Decorated");
- }
- }
- class Program {
- static void Main(string[] args) {
- Undecorated u = new Decorated();
- u.Method1();
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement