IsNumeric Method
Definition
IsNumeric(string, NumberStyles, IFormatProvider)
Determines whether the specified value can be evaluated as a number.
public static bool IsNumeric(string value, NumberStyles styles = NumberStyles.Number, IFormatProvider provider = null)
Parameters
valuestringThe value to be evaluated.
stylesNumberStylesA bitwise combination of NumberStyles values that indicates the permitted format of
value.providerIFormatProviderAn IFormatProvider that supplies culture-specific formatting information about
value.
Returns
- bool
trueif the specified value can be evaluated as a number; otherwise,false.