SystemExtensionGetBit(Byte, Int32) 方法
获取字节型数值中的指定位置的位是否为1。
命名空间: TouchSocket.Core程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
public static bool GetBit(
this byte value,
int index
)
<ExtensionAttribute>
Public Shared Function GetBit (
value As Byte,
index As Integer
) As Boolean
[<ExtensionAttribute>]
static member GetBit :
value : byte *
index : int -> bool
- value Byte
- 要检查的字节型数值。
- index Int32
- 要检查的位的位置,从0到7。
Boolean如果指定位置的位为1,则返回
;否则返回
。在 Visual Basic 和 C# 中,这个方法可以当成为类型
Byte 的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考
扩展方法 (Visual Basic) 或
扩展方法 (C# 编程指南) 获取更多信息。