Useful extension methods for c# object types