Complete C# port