Sample code for c#