Replacing texts

Hi,

Is it possible to replace lines of texts in richtextbox in C#?

like,
start_line = 3, end_line= 10

for(i=start_line; i< end_line; i++)
{
rtb.replaceText(i);
}

Thanks

Is this all of your code? What are you trying to replace it with? Your current form will do nothing.


My bad, didn’t see the Date of the OP.

rtb.Text = rtb.Text.Replace(“what to replace”, “what to replace with”);