I have a custom logging framework writing to a System.Windows.Forms.TextBox. The way i am writing to the TextBox now is like this:
tbLog.Text += newLogEntry.Text;
The problem with this approach is that each time this is executed the strings from the tbLog.Text and newLogEntry.Text are concatenated, and then assigned to tbLog.Text. As the log in the TextBox grows the operation becomes very memory intensive and increasingly slower.
Is there any way of doing this quicker and more efficient?