hey guys,
I am using windows textbox (CLR) and i was wondering how i would replace a newline to a text.
I know how to replace words, i use : textBox1->Text->Replace("first","second"));
but how would i replace a new line?

lets say my textbox looks like this :



what i want to then do is to replace the newlines with text(lets say 5), so after i replace it it should look like this :


i hope i explained what i want clearly,
thanks in advanced.

You will probably have to rewrite all the text lines. Read the lines of the text box into an array of Strings, format the Strings the way you want them, then write the Strings back to the text box.