Returns a value indicating the sign of a double-precision floating-point number.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static int Sign(
double value
)
Parameters
- value
- Type: SystemDouble
A signed number.
Return Value
Type:
Int32A number that indicates the sign of
value, as shown in the following table.Return value Meaning -1
value is less than zero. 0
value is equal to zero. 1
value is greater than zero.
Exceptions Exception | Condition |
---|
ArithmeticException | value is equal to NaN. |
See Also