example code written in C#