“AA BB CC”這種遇绞,在前面添加0x后可使用下面這種方法轉(zhuǎn)換為數(shù)組
var command = str.Split(' ').Select(temp => "0x" + temp).Select(temp => (byte) Convert.ToInt32(temp, 16))
.ToArray();
“AA BB CC”這種遇绞,在前面添加0x后可使用下面這種方法轉(zhuǎn)換為數(shù)組
var command = str.Split(' ').Select(temp => "0x" + temp).Select(temp => (byte) Convert.ToInt32(temp, 16))
.ToArray();