admin 管理员组

文章数量: 1086019


2024年12月22日发(作者:treeview属性方法)

'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};

public static string ToHexString(byte[] bytes) {

char[] chars = new char[ * 2];

for (int i = 0; i < ; i++) {

int b = bytes[i];

chars[i * 2] = hexDigits[b >> 4];

chars[i * 2 + 1] = hexDigits[b & 0xF];

}

return new string(chars);

}

static void Main() {

byte[] b = {0x00, 0x12, 0x34, 0x56, 0xAA, 0x55, 0xFF};

ine(ToHexString(b));

}

}


本文标签: 方法 属性 作者