//LisByteToInt(new List<byte> { 1, 1, 1, 1 });
int LisByteToInt(List<byte> ls)
{
int tmp = 0;
for (int i = 0; i < ls.Count(); i++)
{
tmp |= ls[ls.Count() - i - 1] << (i);
}
return tmp;
}
C# 二进制格式的byte数组转换成十进制
![](https://img-home.csdnimg.cn/images/20240711042549.png)