1.分割字符串IdStr为int数组Ids
int[] Ids = Array.ConvertAll<string, int>(IdStr.Trim().Split(','), delegate(string i) { return Convert.ToInt32(i); }); 2.分割字符串NameStr为string数组Names
string[] names = NameStr.Split(new char[] { ',' });
3.拼凑int数组Ids为字符串IdStr
string IdStr= string.Join(",", Array.ConvertAll<int, string>(Ids, delegate(int i) { return i.ToString(); }));