Class Assignment Converted to C#