BitOperations.IsPow2 方法   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| IsPow2(UIntPtr) | 确定指定的整型值是否为 2 的幂。 | 
| IsPow2(UInt32) | 评估指定的 UInt32 值是否为 2 的幂。 | 
| IsPow2(UInt64) | 评估指定的 UInt64 值是否为 2 的幂。 | 
| IsPow2(Int64) | 评估指定的 Int64 值是否为 2 的幂。 | 
| IsPow2(Int32) | 评估指定的 Int32 值是否为 2 的幂。 | 
| IsPow2(IntPtr) | 确定指定的整型值是否为 2 的幂。 | 
IsPow2(UIntPtr)
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
重要
此 API 不符合 CLS。
确定指定的整型值是否为 2 的幂。
public:
 static bool IsPow2(UIntPtr value);[System.CLSCompliant(false)]
public static bool IsPow2(UIntPtr value);[<System.CLSCompliant(false)>]
static member IsPow2 : unativeint -> boolPublic Shared Function IsPow2 (value As UIntPtr) As Boolean参数
- value
- 
				
				UIntPtr
unativeint 
值。
返回
              true 如果值为 2 的幂,则为 ; false 否则。
- 属性
适用于
IsPow2(UInt32)
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
重要
此 API 不符合 CLS。
评估指定的 UInt32 值是否为 2 的幂。
public:
 static bool IsPow2(System::UInt32 value);[System.CLSCompliant(false)]
public static bool IsPow2(uint value);[<System.CLSCompliant(false)>]
static member IsPow2 : uint32 -> boolPublic Shared Function IsPow2 (value As UInteger) As Boolean参数
- value
- UInt32
要计算为 2 的幂的值。
返回
              true 如果指定的值为 2 的幂,则为 ; false 否则。
- 属性
适用于
IsPow2(UInt64)
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
重要
此 API 不符合 CLS。
评估指定的 UInt64 值是否为 2 的幂。
public:
 static bool IsPow2(System::UInt64 value);[System.CLSCompliant(false)]
public static bool IsPow2(ulong value);[<System.CLSCompliant(false)>]
static member IsPow2 : uint64 -> boolPublic Shared Function IsPow2 (value As ULong) As Boolean参数
- value
- UInt64
要计算为 2 的幂的值。
返回
              true 如果指定的值为 2 的幂,则为 ; false 否则。
- 属性
适用于
IsPow2(Int64)
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
评估指定的 Int64 值是否为 2 的幂。
public:
 static bool IsPow2(long value);public static bool IsPow2(long value);static member IsPow2 : int64 -> boolPublic Shared Function IsPow2 (value As Long) As Boolean参数
- value
- Int64
要计算为 2 的幂的值。
返回
              true 如果指定的值为 2 的幂,则为 ; false 否则。
适用于
IsPow2(Int32)
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
评估指定的 Int32 值是否为 2 的幂。
public:
 static bool IsPow2(int value);public static bool IsPow2(int value);static member IsPow2 : int -> boolPublic Shared Function IsPow2 (value As Integer) As Boolean参数
- value
- Int32
要计算为 2 的幂的值。
返回
              true 如果指定的值为 2 的幂,则为 ; false 否则。
适用于
IsPow2(IntPtr)
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
确定指定的整型值是否为 2 的幂。
public:
 static bool IsPow2(IntPtr value);public static bool IsPow2(IntPtr value);static member IsPow2 : nativeint -> boolPublic Shared Function IsPow2 (value As IntPtr) As Boolean参数
- value
- 
				
				IntPtr
nativeint 
值。
返回
              true 如果值为 2 的幂,则为 ; false 否则。