2 排数字穿插起来
请问像下面这样怎么做例如:A="15,2,7,8,9,6,2"
B="15,6,7,81,91,62,23"
要把他合并一起成:
C="15-15,2-6,7-7,8-81,9-91,6-62,2-23" 青椒怎么弄
string a = "1,2,3,4"; string b = "5,6,7,8"; string[] arra = a.Split(','); string[] arrb = b.Split(','); string c = ""; for (int i = 0; i < arra.Length; i++) { c += arra[i] + "-" + arrb[i] + ","; } Console.WriteLine(c.TrimEnd(','));