一,字符串根据逗号,分割成数组
string[] str; string str2 = "1,2,3"; str = str2.Split(‘,‘);
二,数组转换为以逗号分割的字符串
string[] array = { "1", "2", "3"}; string array1 = string.Join(",", array);
时间: 2024-10-26 20:11:43
一,字符串根据逗号,分割成数组
string[] str; string str2 = "1,2,3"; str = str2.Split(‘,‘);
二,数组转换为以逗号分割的字符串
string[] array = { "1", "2", "3"}; string array1 = string.Join(",", array);