Design patterns using C#