Useful extension methods for C#.