打开文件,读取所有数据,对数据进行划分
//find the txt and read
// 打开文件准备读取数据
StreamReader rd = File.OpenText("D:\\ak_xls_txt.txt");
string restOfStream = rd.ReadToEnd();
rd.Close();
//输出DataTable中保存的数组
PetrelLogger.InfoOutputWindow(restOfStream.ToString());
// restOfStream = restOfStream.Replace(""," ");
string[] arr1 = restOfStream.Split(' ', '\n');
博客主要讲述了对文件操作的过程,先打开文件,接着读取文件中的所有数据,最后对读取到的数据进行划分。
2348

被折叠的 条评论
为什么被折叠?



