C# string数组转int数组
用法//字符串数组(源数组)
string[] sNums = new[] {"1", "2"};//整型数组(目标数组)
int[] iNums;//转换方法
iNums = Array.ConvertAll<string, int>(sNums , s => int.Parse(s));//转换方法-简写
iNums = Array.ConvertAll<string, int>(sNums ,
原创
2017-04-13 13:32:50 ·
20389 阅读 ·
1 评论