Converted all C++ Code to C# manually.