convert vb code to c#