【发布时间】:2011-08-27 20:04:11
【问题描述】:
我有以下代码:
string s = "2563MNBJP89256666666685755854";
Byte[] bytes = encoding.GetBytes(s);
string hex = "";
foreach (byte b in bytes)
{
int c=b;
hex += String.Format("{0:x2}", (uint)System.Convert.ToUInt32(c.ToString()));
}
它打印十六进制值。我怎样才能将它添加到这样的向量 ob 字节中?
new byte [0x32,0x35..]
In hex I have : 323536....等等。下一步是to add then in a byte[] vector in the following format 0x32,0x35..and so on; How to do this?
谢谢
【问题讨论】:
-
请阅读有关如何使用本网站的常见问题解答...
-
你的意思是字节数组吗?你的意思是base64?你的意思是另一串十六进制数字字符吗?
-
是一个包含十六进制值的数组 og 字节
-
嗯,你能澄清一下你想要达到的目标吗?