日期:2014-05-17 浏览次数:20971 次
string source = @"西瓜,1,a
苹果,2,b
橙子,3,c";
string[] array1 = source.Split(new char[] { '\r', '\n' }).Select(x => x.Split(',')[0]).ToArray();
string[] array2 = source.Split(new char[] { '\r', '\n' }).Select(x => x.Split(',')[1]).ToArray();
string[] array3 = source.Split(new char[] { '\r', '\n' }).Select(x => x.Split(',')[2]).ToArray();