C# Sample Code