語言

Int32.IsPow2(Int32) 方法

定義

判斷值是否為兩個乘冪。

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

參數

value
Int32

要檢查的值。

傳回

true 若 value 為二的冪次方;否則,為 false。

實作

適用於