字符串拆分赋值给数组string[] b = a.Split(',')

阎功
2023-12-01

把字符串a按 , 进行分隔后得到的数组赋给b
例:
a = “12,3,5,125”;
string[] b = a.Split(’,’);

b中的值是
b[0] = 12
b[1] = 3
b[2] = 5
b[3] = 125

 类似资料: