loading data into each textbox line by line
- by Kyle
private void sessionText()
{
try
{
System.IO.TextReader r = new System.IO.StreamReader("saved.txt");
this.textBox1.Text = r.ReadLine();
r.Close();
}
catch (Exception x)
{
MessageBox.Show("Exception " +x);
}
}
It reads the line into textBox1 but now I'm expanding my application. I added 5 more textBoxes and now I'm trying to load the data in each one saved line by line. How can I load each line into the next textbox?
Line 0 -> textBox1
Line 1 -> textBox2
Line 2 -> textBox3