VB2008,2010读取文本

支持任何扩展名,但对中文不支持:

 

代码
Dim objReader As New StreamReader("文本地址“)

 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

        Next

 

posted @ 2010-08-18 13:26  Zhener-Maozhenyu  阅读(249)  评论(0编辑  收藏  举报