我将输入作为左侧 11 位数字,输出应该在此之前,或者任何人都可以告诉我如何通过将这些输入作为字节数组来获得输出
最佳答案
Example of first line
@更改为支持点 string[] line = "82 44 b4 2e 39 39 39 39 39 35".Split(' ');
byte[] bytes = new byte[line.Length];
for (int i = 0; i < line.Length; i++) {
int candidate = Convert.ToInt32(line[i], 16);
if (!(!(candidate < 0x20 || candidate > 127)))
candidate = 46; //.
bytes[i] = Convert.ToByte(candidate);
}
string s = System.Text.Encoding.ASCII.GetString(bytes);
关于c# - 任何人都可以告诉这是什么类型的转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5651208/