VB.NET也可以用using
先FileStream,再StreamReader(写用StreamWriter)
Using fs As New FileStream(p1, FileMode.Open, FileAccess.Read)
Using sw As New StreamReader(fs)
Return sw.ReadToEnd
End Using
End Using
VB.NET也可以用using
先FileStream,再StreamReader(写用StreamWriter)
Using fs As New FileStream(p1, FileMode.Open, FileAccess.Read)
Using sw As New StreamReader(fs)
Return sw.ReadToEnd
End Using
End Using
转载于:https://www.cnblogs.com/mingming00/p/8520341.html