Inserting a tab character into text using C#

后端 未结 9 1116
南笙
南笙 2020-11-28 18:15

I\'m building an application where I should capture several values and build a text with them: Name, Age, etc.

The output will be a plain

9条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 18:55

    string St = String.Format("{0,-20} {1,5:N1}\r", names[ctr], hours[ctr]);
    richTextBox1.Text += St;
    

    This works well, but you must have a mono-spaced font.

提交回复
热议问题