خواندن و نوشتن در یک فایل متنی و باینری
نوشتن متنی -1'
(" Dim tw As TextWriter = File.CreateText("d:\text1.txt
(".tw.Write("Hello word
() tw.close
'2- نوشتن متنی
Dim sw As New StreamWriter("d:\text2.txt")
sw.Write("Hello word.")
sw.Close()
'1- خواندن متنی
Dim tr As TextReader = File.OpenText("d:\text1.txt")
MsgBox(tr.ReadToEnd())
tr.Close()
'2- خواندن متنی
Dim sr As New StreamReader("d:\text2.txt")
MsgBox(sr.ReadToEnd())
sr.Close()