日期:2012-01-17  浏览次数:20466 次

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