C#使用TextReader从文本类型文件读取数据
TextReader reader = File.OpenText(@"C:\data\file.xml");
// Read a line at a time until we reach the end of file
while (reader.Peek( ) != -1) {
string line = reader.ReadLine( );
Console.WriteLine(line);
}
reader.Close( );
