Some C# code to test different design patterns