asked on
......
Dim ts As StreamReader
Try
With odlgTextFile
.CheckFileExists = True
......
If .ShowDialog() = DialogResult.OK Then
FileName = .FileName
ts = New StreamReader(.OpenFile)
txtFileContents.Text = ts.ReadToEnd()
End If
End With
Catch exp As Exception
MessageBox.Show(exp.Message, Me.Text)
Finally
If Not (ts Is Nothing) Then
ts.Close()
End If
End Try