Int32.IsOddInteger(Int32) 方法

定義

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

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

參數

value
Int32

傳回

Boolean

true 如果 value 是奇數整數,則為 , false 否則為 。

實作

備註

這個方法會正確處理浮點值,因此 3.0 會傳回 ,同時 3.3 會傳回 true false

false 傳回值不表示 IsEvenInteger(TSelf) 會傳回 true 。 小數部分的數位,例如 , 3.3 不是偶數或奇數。

適用於