[C#] C#通过TextReader从文本文件读取数据 →→→→→进入此内容的聊天室

来自 , 2020-06-03, 写在 C#, 查看 152 次.
URL http://www.code666.cn/view/c4bf1e24
  1. TextReader reader = File.OpenText(@"C:\data\file.xml");
  2.  
  3. // Read a line at a time until we reach the end of file
  4. while (reader.Peek( ) != -1) {
  5.   string line = reader.ReadLine( );
  6.   Console.WriteLine(line);
  7. }
  8. reader.Close( );
  9. //csharp/7739

回复 "C#通过TextReader从文本文件读取数据"

这儿你可以回复上面这条便签

captcha