Change Java to C#