Is there a way to determine whether or not a given .Net Type is a number? For example: System.UInt32/UInt16/Double are all numbers. I want to avoid a long switc
System.UInt32/UInt16/Double
This may work as well. However, you may want to follow it up with a Type.Parse to cast it the way you want it afterwards.
public bool IsNumeric(object value) { float testValue; return float.TryParse(value.ToString(), out testValue); }