VB2008,2010读取文本
支持任何扩展名,但对中文不支持:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
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