Hi all,

I have a problem with the multi line text box, it executes the "\t" but does not execute "\n".

for example:

outputTextBox.Text ="\t\t ..........\n";

This statement does not execute "\n";

I do not know what the problem is? Can any body tells me?

regards
Khaled

outputTextBox.Text ="\t\t ..........\n";

Should be :

outputTextBox.Text ="\t\t ..........[B]\r\n[/B]";
commented: Great +1

if this thread solved, please mark as Solved.
Happy coding Friend :)

The text box control only recognizes the system newline, not the language newline, which could be different. Typically '\n' isn't actually multiple characters if the system uses something like CRLF. Instead, whenever '\n' is sent back to the system (through file I/O for example), it's expanded into CRLF.

Jx_Man gave the answer, but C# isn't only restricted to Windows. A more portable solution uses Environment.NewLine:

outputTextBox.Text ="\t\t .........." + Environment.NewLine;

outputTextBox.Text ="\t\t .........." + Environment.NewLine;

Great...
i don't have much experience in c#, thx for information narue.