Visual C# 通用語言示例主題(二)(MSDN整理)

15.代碼:一次讀取一行文本文件 (Visual C#)編程 本示例使用 StreamReader 類的 ReadLine 方法將文本文件的內容讀取(一次讀取一行)到字符串中。全部文本行都保存在字符串 line 中並顯示在屏幕上。數組 示例:函數 int counter = 0; string line; // Read the file and display it line by line.
相關文章
相關標籤/搜索