Programming Exercise in C#