Add a few C# extension methods