Decimal.IsInteger(Decimal) Método

Definición

Determina si un valor representa un número entero.

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

Parámetros

value
Decimal

Valor que se va a comprobar.

Devoluciones

true es si value es un entero; de lo contrario, falsees .

Implementaciones

Comentarios

Este método controla correctamente los valores de punto flotante, por lo que 2.0 y 3.0 devolverán true mientras 2.2 y 3.3 devolverán false.

Se aplica a