CSharp updated code.