在vb.net使用System.IO读取文本文件 - 中国WEB开发者网络 (http://www.webasp.net) -- 技术教程 (http://www.webasp.net/article/) --- 在vb.net使用System.IO读取文本文件 (http://www.webasp.net/article/4/3966.htm) |
| -- 作者:未知 -- 发布日期: 2003-07-12 |
| Imports System Imports System.IO Imports System.Collections Module Module1 Sub Main() Dim objReader As New StreamReader("c:\test.txt") Dim sLine As String = "" Dim arrText As New ArrayList() Do sLine = objReader.ReadLine() If Not sLine Is Nothing Then arrText.Add(sLine) End If Loop Until sLine Is Nothing objReader.Close() For Each sLine In arrText Console.WriteLine(sLine) Next Console.ReadLine() End Sub End Module |
| webasp.net |