string数组批量转换成Int数组

public static int StrToInt(string str)
{
  return int.Parse(str);
}

 

int[] empIds = Array.ConvertAll(ids.Split(','), new Converter<string, int>(StringHelper.StrToInt));

posted @ 2018-04-13 09:23  剑舞江南  阅读(207)  评论(0编辑  收藏  举报