Some .NET helpers.