Adding new line of data to TextBox

前端 未结 5 1330
一生所求
一生所求 2020-12-08 13:31

I\'m doing a chat client, and currently I have a button that will display data to a multi-line textbox when clicked. Is this the only way to add data to the multi-line textb

5条回答
  •  伪装坚强ぢ
    2020-12-08 14:00

    I find this method saves a lot of typing, and prevents a lot of typos.

    string nl = "\r\n";

    txtOutput.Text = "First line" + nl + "Second line" + nl + "Third line";

提交回复
热议问题