数组类型转成另一种数组类型"/>
c# 将一种数组类型转成另一种数组类型
便捷的代码处理,大致2种方法:
string[] strpcid = item.cid.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
int[] intpcid = Array.ConvertAll<string, int>(strpcid, s => int.Parse(s));
var intarr = Enumerable.Range(0, 100);
string[] str = intarr.Cast<string>().ToArray();
更多推荐
c# 将一种数组类型转成另一种数组类型
发布评论