Double.IsOddInteger(Double) 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷值是否代表奇數整數。
public:
static bool IsOddInteger(double value) = System::Numerics::INumberBase<double>::IsOddInteger;
C#
public static bool IsOddInteger(double value);
static member IsOddInteger : double -> bool
Public Shared Function IsOddInteger (value As Double) As Boolean
- value
- Double
要檢查的值。
true
如果 value
是奇數整數,則為 , false
否則為 。
這個方法會正確處理浮點值,因此 3.0
會傳回 ,同時 3.3
會傳回 true
false
。
的 false
傳回值不表示 IsEvenInteger(TSelf) 會傳回 true
。 小數部分的數位,例如 , 3.3
不是偶數或奇數。
產品 | 版本 |
---|---|
.NET | 7, 8, 9, 10 |