Added C# code for homework 2 by stochastictinker