字符串:string strdelId="1,2,3,4,5,6,";
去掉末尾逗號:strdelId=strdelId.TrimEnd(',');
string[] arrID = strdelId.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);//字符串轉字符串集合
int[] intArray = Array.ConvertAll<string, int>(arrID, s => int.Parse(s));//字符串集合轉int類型集合