Useful extensions and utility methods for C#