Some useful extension methods for C#.