An amateur's attempt at C# code.