private void BtnLoad_Click(object sender, EventArgs e) { try { Line = Document.ReadLine(); while (Line != null) { RtbClients.AppendText(Line + "\n"); Line = Document.ReadLine(); } } catch { MessageBox.Show("Error"); } }
private void Button1_Click(object sender, EventArgs e) { StreamReader ReadClients = new StreamReader(@"C:\Users\Alejandra\Desktop\REGISTRADOS.txt"); string Line; try { Line = ReadClients.ReadLine(); while (Line != null) { RtbClients.AppendText(Line + "\n"); Line = ReadClients.ReadLine(); } } catch { MessageBox.Show("Error"); } }