Class NumberUtils
Provides a collection of static utility methods for performing common numeric operations.
public static class NumberUtils
- Inheritance
-
NumberUtils
- Inherited Members
Methods
IsNumber(object)
Determines whether the specified object is an instance of any built-in numeric type, including signed and unsigned integral types as well as floating-point and decimal types.
public static bool IsNumber(this object value)
Parameters
valueobjectThe object to evaluate.
Returns
- bool
trueifvalueis one of the supported numeric types (sbyte, byte, short, ushort, int, uint, long, ulong, float, double, or decimal); otherwise,false.
ToDouble(object)
Converts the specified object to a double-precision floating-point number using the underlying ToDouble(object) conversion.
public static double ToDouble(this object value)