Read contents of a file with TextReader
VB.NET
1: Dim tr As TextReader = File.OpenText("C:\temp\somefile.txt")
2: Console.Write(tr.ReadToEnd())
3: tr.Close()
1: TextReader tr = File.OpenText(@"C:\temp\somefile.txt");
2: Console.Write(tr.ReadToEnd());
3: tr.Close();