摘要: public void Test() { byte[] results = new byte[1]; results[0] = 0xff; int temp = results[0]; byte b = SetBit(results[0], 7, 0); Console.WriteLine(b); 阅读全文
posted @ 2022-07-19 17:43 搬砖的L先生 阅读(374) 评论(0) 推荐(0)
摘要: /// /// 获取字节中的指定Bit的值 /// /// 字节 /// Bit的索引值(0-7) /// public int GetBit(byte test, int index) { byte x = 1; switch (index) { case 0: { x = 0x01; } bre 阅读全文
posted @ 2022-07-19 17:30 搬砖的L先生 阅读(1110) 评论(0) 推荐(0)