只会写打开 TXT文件的程式 求达人写个显示其行数的 刚刚学 光写打开的 我已经快要不行了 尽量写的简单点 容易理解 谢谢了try{using (StreamReader sr= new StreamReader("a.txt")){string line;while((line=sr.ReadLine())!=null){Console.WriteLine(line);}}}catch(Exception e){Console.WriteLine("The file could not be read:");Console.WriteLine(e.Message);