How to read text file?
This is very easy in .net. Use the following code. You have to use the namespace System.IO. using System.IO;
using (StreamReader sr = new StreamReader(@"C:\readme.txt")) {
String line; while ((line = sr.ReadLine()) != null) {
Console.WriteLine(line); } }