Added C# version of the code

Tried to stay in the original intent of the Java code and resist
refactoring :)