Working C# sample