C#

Added C# version of code