Convert examples to C#