CSharp code