Partial conversion of Java runtime library to C#