I\'m trying to color parts of a string to be appended to a RichTextBox. I have a string built from different strings.
string temp = \"[\" + DateTime.Now.ToSh
I have expanded the method with font as a parameter:
public static void AppendText(this RichTextBox box, string text, Color color, Font font)
{
box.SelectionStart = box.TextLength;
box.SelectionLength = 0;
box.SelectionColor = color;
box.SelectionFont = font;
box.AppendText(text);
box.SelectionColor = box.ForeColor;
}