Off the top of my head, you could always implement the brute force approach to testing the string entry - I've just knocked this up in Notepad but the theory is sound:
public static class ConverterExtensions
{
public static bool IsNumber(this string source)
{
if (string.IsNullOrWhitespace(source)) return false;
const Types[] types = new Type[]{
typeof(short), typeof(ushort),
typeof(int), typeof(uint),
typeof(long), typeof(ulong),
typeof(float), typeof(double), typeof(decimal)
};
foreach (Type type in types)
{
if (source.TryChangeType(type))
return true;
}
return false;
}
public static bool TryChangeType(this string source, Type targetType)
{
try
{
Convert.ChangeType(source, targetType);
return true;
}
catch (Exception)
{
return false;
}
}
}