UIntPtr.IsOddInteger(UIntPtr) 方法

定义

确定值是否表示奇数整数。

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

参数

value
UIntPtr

unativeint

要检查的值。

返回

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

实现

注解

此方法正确处理浮点值,因此3.0返回时true将返回3.3false

返回值 false 并不表示 IsEvenInteger(TSelf) 将返回 true。 例如 3.3,具有小数部分的数字甚至不是偶数或奇数。

适用于