CSharp examples for File IO:Text File
read from a text file
using static System.Console; using static System.IO.Directory; using static System.IO.Path; using static System.Environment; using System.IO;// w w w. j a va 2s .c om class Program { static void Main(string[] args) { WriteLine($"Reading contents of {"backupFile"}:"); StreamReader textReader = File.OpenText("backupFile"); WriteLine(textReader.ReadToEnd()); textReader.Close(); } }