How can I delete a specific line of text in a RichTextBox ?
Lots of good answers, but I find many far to complicated.
string[] LinesArray = this.richTextBox1.Lines;
this.richTextBox1.Clear();
for (int line = 0; line < LinesArray.Length; line++)
{
if (!LinesArray[line].Contains("< Test Text To Remove >"))
{
this.richTextBox1.AppendText(LinesArray[line] + Environment.NewLine);
}
}
I hope this helps others some ;0)