c# - Rich Text Box - text coloring error -


I wrote this function

  add private zero rich (string joe, string what) {String colorString = Joe + "(" + DateTime now.tostring ("DD / MM / YY HH: mm: SS") + "):"; RichTextBox1.Text + = colorstring + "" + what \ "\ r \ n \ r \ n"; RichTextBox1.DeselectAll (); RichTextBox1. Select (richTextBox1.Find (colorstring), colorstring.Length); RichTextBox1.SelectionColor = Color.blue; RichTextBox1.DeselectAll (); }   

Which should who

yet another Bar makes all this text blue ... any thoughts that may be wrong with it?

Thank you!

try

  add private zero rich (string which, string What) {string colorstring = who + "(" + DateTime.Now.ToString ("dd / MM / Yyyy HH: mm: ss") + "):"; RichTextBox1.AppendText (ColorString + "+ + r \ n \ r \ n"); RichTextBox1. Select (richTextBox1.Text.LastIndexOf (colorstring), colorstring.Length); RichTextBox1.SelectionColor = Color.blue; }    

Comments