Int16.IsEvenInteger(Int16) Metodo

Definizione

Determina se un valore rappresenta un numero integrale pari.

public:
 static bool IsEvenInteger(short value) = System::Numerics::INumberBase<short>::IsEvenInteger;
public static bool IsEvenInteger (short value);
static member IsEvenInteger : int16 -> bool
Public Shared Function IsEvenInteger (value As Short) As Boolean

Parametri

value
Int16

Valore da controllare.

Restituisce

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

Implementazioni

Commenti

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

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

Si applica a