Read whole text file to the end : Text File Read Write « File Stream « C# / C Sharp
- C# / C Sharp
- File Stream
- Text File Read Write
Read whole text file to the end
using System;
using System.Data;
using System.IO;
class Class1{
static void Main(string[] args){
StreamReader sr = new StreamReader("practice.txt");
Console.WriteLine(sr.ReadToEnd());
sr.Close();
}
}
Related examples in the same category