2014年2月13日

string[]转换为int[]

摘要: 今天碰到一个问题,要把string[]转换为int[],但是又不想使用循环转换,找了好久最后找到了这种方法,特此记录下。string[] input = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; int[] output = Array.ConvertAll(input, delegate(string s) { return int.Parse(s); }); 阅读全文

posted @ 2014-02-13 16:07 奋斗的小老虎 阅读(865) 评论(0) 推荐(0) 编辑

导航