CSharp example of design patterns