macorett

macorett

  • NA
  • 12
  • 0

C# - Multiline TextBox Question: how to insert a newline ?

Jul 14 2004 4:24 PM
Hello to all C# specialists, here a easy question from a C# newbie :) Does anybody know how to insert a newline character into a string which is inserted into a multiline textBox (all this with Visual Studio.Net 2003 but for a smart device application under WinCE4.2) I tried the following code and receive a square instead of the line break in the output: // code extract sample ... stringNewError = "\n New Error Number ..." textBox1.Text = TextBox1.Text + stringNewError; ... // end of code extract sample The output shows the old textBox Text content plus the new added stringNewError content in multiple lines, but directly attached within the same line (instead starting with a new line ) just being seperated by a little empty square symbol. The target should be to have the stringNewError starting with a new line ... Any sample, explanation or help would be very welcome Thx Max

Answers (4)