UInt16.IsOddInteger(UInt16) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷值是否代表奇數整數。
public:
static bool IsOddInteger(System::UInt16 value) = System::Numerics::INumberBase<System::UInt16>::IsOddInteger;
public static bool IsOddInteger (ushort value);
static member IsOddInteger : uint16 -> bool
Public Shared Function IsOddInteger (value As UShort) As Boolean
參數
- value
- UInt16
要檢查的值。
傳回
true
如果 value
是奇數整數,則為 ,否則為 false
。
實作
備註
這個方法正確地處理浮點值,因此 3.0
會傳回 ,同時 3.3
會傳回 false
true
。
的 false
傳回值不表示會傳 IsEvenInteger(TSelf) 回 true
。 分數部分的數位,例如, 3.3
不是偶數或奇數。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應