NFloat.IsEvenInteger(NFloat) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷值是否代表偶數整數。
public:
static bool IsEvenInteger(System::Runtime::InteropServices::NFloat value) = System::Numerics::INumberBase<System::Runtime::InteropServices::NFloat>::IsEvenInteger;
public static bool IsEvenInteger(System.Runtime.InteropServices.NFloat value);
static member IsEvenInteger : System.Runtime.InteropServices.NFloat -> bool
Public Shared Function IsEvenInteger (value As NFloat) As Boolean
參數
- value
- NFloat
要檢查的值。
傳回
true 如果 value 是偶數整數,則為 ,否則為 false。
實作
備註
這個方法正確地處理浮點值,因此 2.0 會傳回 ,同時2.2會傳回 falsetrue 。
傳 false 回值不表示會傳 IsOddInteger(TSelf) 回 true。 分數部分的數位,例如, 3.3不是偶數或奇數。