Decimal Math.Sign Method
Returns a value indicating the sign of a decimal number.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
A 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.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
public static int Sign(
decimal value
)
Parameters
- value Decimal
- A signed System.Decimal number.
Return Value
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.