UIntPtr.IsOddInteger(UIntPtr) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
确定值是否表示奇数整数。
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.3 将返回 false。
返回值 false 并不意味着 IsEvenInteger(TSelf) 将返回 true。 例如 3.3,具有小数部分的数字不是偶数或奇数。