I want to read a huge .txt file and I'm getting a memory overflow because of its sheer size.
Any help?
private void button1_Click(object sender, EventArgs e)
{
using (var Reader = new StreamReader(@"C:\Test.txt"))
{
textBox1.Text += Reader.ReadLine();
}
}
Text file is just:
Line1
Line2
Line3
Literally like that.
I want to load the text file to a multiline textbox just as it is, 100% copy.