Move code to C# using SharpKit