How to add a line to a multiline TextBox?

后端 未结 10 615
情话喂你
情话喂你 2020-12-01 15:32

How can i add a line of text to a multi-line TextBox?

e.g. pseudocode;

textBox1.Clear();
textBox1.Lines.Add(\"1000+\");
textBox1.Lines.Add(\"750-999\         


        
10条回答
  •  眼角桃花
    2020-12-01 16:20

    Try this

    textBox1.Text += "SomeText\r\n" 
    

    you can also try

    textBox1.Text += "SomeText" + Environment.NewLine;
    

    Where \r is carriage return and \n is new line

提交回复
热议问题