Converision to C#, as usual...