快速统计文本文件中的行数( StreamReader.ReadLine() ): 测试代码如下: //读取txt文件中总行数的方法 public static int requestMethod(String _fileName) { Stopwatch sw = new Stopwatch(); var path = _fileName; ; //按行读取 sw.Restart(); using (var sr = new StreamReader(path)) { var ls = "&qu…