我知道您可以使用printf,也可以使用StringBuilder.append(String.format("%x", byte))将值转换为十六进制值,并在控制台上显示它们。但我希望能够实际格式化字节数组,以便每个字节都显示为十六进制而不是十进制。这是我已经拥有的代码的一部分,它完成了我所说的前两种方式: {
byteArray = new by
我从下面的两个值开始:string[] holder = finalString.Split(',');foreach (string item in holder) //concatenate 0x and add the value to a byte array在每次迭代中,我希望连接0x以使其成为十六进制值,并将其添加到字节