.NET code sample