Code samples for C# and .Net