Decimal.Sign(Decimal) Método

Definição

Calcula o sinal de um valor.

public:
 static int Sign(System::Decimal d) = System::Numerics::INumber<System::Decimal>::Sign;
public static int Sign(decimal d);
static member Sign : decimal -> int
Public Shared Function Sign (d As Decimal) As Integer

Parâmetros

d
Decimal

O valor cujo sinal deve ser calculado.

Devoluções

Um valor positivo se for positivo, d se Zero for zero, e um valor negativo se dd for negativo.

Implementações

Observações

Recomenda-se que uma função retorne 1, 0, e -1, respetivamente.

Aplica-se a