Visual C# 通用语言示例主题(二)(MSDN整理)

15.代码:一次读取一行文本文件 (Visual C#)编程 本示例使用 StreamReader 类的 ReadLine 方法将文本文件的内容读取(一次读取一行)到字符串中。全部文本行都保存在字符串 line 中并显示在屏幕上。数组 示例:函数 int counter = 0; string line; // Read the file and display it line by line.
相关文章
相关标签/搜索