IntPtr.IsEvenInteger(IntPtr) 方法

定義

判斷值是否代表偶數整數。

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

參數

value
IntPtr

nativeint

要檢查的值。

傳回

true 若為 value 整數;否則,為 false

實作

備註

此方法正確處理浮點數值,因此 2.0 會回傳 true ,而 2.2 會回傳 false

返回值 false 不代表會 IsOddInteger(TSelf) 返回 true。 例如,帶有分數部分的數字, 3.3則不是偶數或奇數。

適用於