Jump to content

Visual C# TextBox


RobberBaron

Recommended Posts

I am trying to use the lines in a TextBox to copy the line index data to another textbox. My problem is, whenever I try to append text to the second textbox, I get an IndexOutOfRangeException (Index was outside the bounds of the array). Is there some way to append text, regardless of line position? Here is the code I am using:

private void textBox2_TextChanged(object sender, EventArgs e){	for (int _ = 0; _ < textBox2.Lines.Length; _++)	{		textBox1.Lines.SetValue(_.ToString(), _);	};}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...