string数组转化成int数组


 string idsStr = "1,2,3,4,5";
 int[] ids = idsStr.Split(',').Select(Int32.Parse).ToArray();