0
我有一個字符串數組轉換字符串數組轉換爲十六進制陣列
Receivedbyte[0]=5A
Receivedbyte[1]=3A
Receivedbyte[2]=7A
Receivedbyte[3]=60
我想將它們視爲十六進制數和0x20的異或的每個值。 所以我想我的數據是 0x5A^0x20在第0個位置。等等。
我嘗試了以下操作,但出現錯誤說輸入字符串格式不正確。
static public string[] escapeFix(string[] Receivedbyte)
{
uint temp = Convert.ToUInt32(Receivedbyte[1]);
temp = temp^0x20;
Receivedbyte[0] = Convert.ToString(temp);
Receivedbyte[1] = Receivedbyte[2];
Receivedbyte[2] = Receivedbyte[3];
return Receivedbyte;
}
您定位的語言是? C#? –