快速读取txt文档
private static void ReadLog() { using (StreamReader reader = new StreamReader("d:\\log_error.txt")) { int x = 0; while (!reader.EndOfStream) { Console.WriteLine(reader.ReadLine()); if (x++ >= 100) { break; } } } Console.ReadLine(); }
posted on 2013-11-22 16:52 Devin.Dong 阅读(318) 评论(1) 编辑 收藏 举报