我有以下代碼:STRING TO HEX如何添加一個向量ob字節?
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?
THX
http://stackoverflow.com/questions/2575468/string-to-byte-array爲C++部分 – Mat 2011-05-18 07:46:33
請閱讀有關如何使用此FAQ的常見問題網站... – 2011-05-18 08:17:32
你的意思是一個字節數組?你的意思是base64嗎?你是指另一串十六進制數字字符? – Jodrell 2011-05-18 08:20:03