如何实现十六进制加法
strB=0x120x340x560x780x90; textbox1.text=strB; 如何实现0x12+0x34+0x56+0x78+0x90,十六进制相加的和(补充一下,十六进制个数不确定)
------解决方案--------------------
取出的话,你可以
String strB="0x120x340x560x780x90";
String[] hex = System.Text.RegularExpressions.Regex.Split(strB, "0x");
int a = 0;
for (int x = 1; x < hex.Length; x++)
a += Convert.ToInt32(hex[x], 16);