UIntPtr.IsEvenInteger(UIntPtr) 方法

定义

确定值是否表示偶数。

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

参数

value
UIntPtr

unativeint

返回

Boolean

true 如果 value 为偶数,则为整数;否则为 false

实现

注解

此方法正确处理浮点值,因此 2.0 返回 true2.2 将返回 false

返回值 false 并不意味着 IsOddInteger(TSelf) 将返回 true。 例如 3.3,具有小数部分的数字不是偶数或奇数。

适用于