Some basic design patterns in c#