点击或拖拽改变大小

HslExtensionGetBoolByIndex 方法 (Byte, Int32)

获取Byte的第 boolIndex 偏移的bool值,比如3,就是第4位
Get the bool value of Byte's boolIndex offset, such as 3, which is the 4th bit

命名空间:  HslCommunication
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public static bool GetBoolByIndex(
	this byte byt,
	int boolIndex
)

参数

byt
类型:SystemByte
字节信息
boolIndex
类型:SystemInt32
指定字节的位偏移

返回值

类型:Boolean
bool值

备注

在 Visual Basic 和 C# 中,这个方法可以当成为类型 Byte 的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic)扩展方法 (C# 编程指南) 获取更多信息。
参见