Beginning of translation to C#.