日期:2014-05-18 浏览次数:20949 次
string s=File.OpenText("c:\\1.txt").ReadToEnd(); string[] lines = s.Split(new char[] { Convert.ToChar(13), Convert.ToChar(10) }, StringSplitOptions.RemoveEmptyEntries); string[][] result=new string[lines.Length][]; for (int i = 0; i < lines.Length; i ++) { result[i] = lines[i].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); }
------解决方案--------------------
LS真好。经典
Mark