I find myself often needing to use Integer.TryParse to test if a value is an integer. However, when you use TryParse, you have to pass a reference variable to the function,
public static class Util { public static Int32? ParseInt32(this string text) { Int32 result; if(!Int32.TryParse(text, out result)) return null; return result; } public static bool IsParseInt32(this string text) { return text.ParseInt32() != null; } }