Decimal.IsOddInteger(Decimal) Metodo

Definizione

Determina se un valore rappresenta un numero integrale dispari.

public:
 static bool IsOddInteger(System::Decimal value) = System::Numerics::INumberBase<System::Decimal>::IsOddInteger;
public static bool IsOddInteger (decimal value);
static member IsOddInteger : decimal -> bool
Public Shared Function IsOddInteger (value As Decimal) As Boolean

Parametri

value
Decimal

Valore da controllare.

Restituisce

true se value è un numero intero dispari; in caso contrario, false.

Implementazioni

Commenti

Questo metodo gestisce correttamente i valori a virgola mobile e quindi 3.0 restituirà true mentre 3.3 restituirà false.

Un valore restituito di false non implica che IsEvenInteger(TSelf) restituirà true. Un numero con una parte frazionaria, ad esempio , 3.3non è pari o dispari.

Si applica a