語言

BigInteger.TestBit(Int32) 方法

定義

當且僅當指定位元被設定時,會回傳 true

[Android.Runtime.Register("testBit", "(I)Z", "GetTestBit_IHandler")]
public virtual bool TestBit(int n);
[<Android.Runtime.Register("testBit", "(I)Z", "GetTestBit_IHandler")>]
abstract member TestBit : int -> bool
override this.TestBit : int -> bool

參數

n
Int32

位元的索引來測試。

傳回

true 當且僅當指定位元被設定時。

屬性

例外狀況

如果 n

備註

當且僅當指定位元被設定時,會回傳 true 。 (計算。 ((this & (1<<n)) != 0)

java.math.BigInteger.testBit(.*int)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於