C# sample code