How To Use \n In a TextBox

后端 未结 4 1109
再見小時候
再見小時候 2021-01-01 11:34

I\'m developing a program that I\'m using a string(generatedCode) that contains some \\n to enter a new-line at the textBox that I\'m using it(

4条回答
  •  暖寄归人
    2021-01-01 12:26

    Add a carriage return (\r) and it should work:

    TextBox1.Text = "First line\r\nSecond line";
    

提交回复
热议问题