Adding strings to a RichTextBox in C#
问题 I currently have a function that will set a value to a RichTextBox, although how could you "add" a value or a new line to it, rather than overwriting existing data in the RichTextBox? richTextBox2.Text = DateTime.Today + " Hello"; 回答1: richTextBox2.AppendText(Environment.NewLine + DateTime.Today + " Hello"); 回答2: richTextBox2.AppendText(String.Format("{0} the date is {1}{2}", "Hello", DateTime.Today, Environment.NewLine)); Please don't use + 回答3: richTextBox2.Document.Blocks.Clear();