very useful.
// If there is current text and it does not end in a newline, add one. if (!string.IsNullOrEmpty(outputWindow.Text) && !outputWindow.Text.EndsWith(Environment.NewLine))
{ outputWindow.Text += Environment.NewLine;
}
// Append the text. outputWindow.Text += DateTime.Now.ToString();
// Set the selection to the end of the text, zero length. outputWindow.SelectionLength = 0; outputWindow.SelectionStart = outputWindow.Text.Length;