日期:2014-05-18 浏览次数:20724 次
String REQ = "8A700b01c00c00b000b1FF1500"; string[] ss = Regex.Split(REQ, @"(?<=\G\w{2})", RegexOptions.IgnorePatternWhitespace).Where(a => !string.IsNullOrEmpty(a)).Select(a => a).ToArray(); /* * [0] "8A" string [1] "70" string [2] "0b" string [3] "01" string [4] "c0" string */
------解决方案--------------------
ushort保存的就是十进制,你想取得二进制还是十六进制关键在于你如何转换