How do i color a specific part of text in a richTextBox?
<pre><code>private void LoadKeys(Dictionary&lt;string,List&lt;string&gt;&gt; dictionary, string FileName)
        {
           string line = System.String.Empty;
           using (StreamReader sr = new StreamReader(keywords))
           {
            while ((line = sr.ReadLine()) != null)
            {
                string[] tokens = line.Split(',');
                dictionary.Add(tokens[0], tokens.Skip(1).ToList());
                richTextBox2.AppendText("Url: " + tokens[0] + " --- " + "Localy KeyWord: " + tokens[1]+Environment.NewLine);
                ColorText(richTextBox2, Color.Red);
            }
           } 
        }
</code></pre>

<p>And the function ColorText:</p>

<pre><code>public void ColorText(RichTextBox box, Color color)
        {
            box.SelectionStart = box.TextLength; box.SelectionLength = 0;
            box.SelectionColor = color;
            box.SelectionColor = box.ForeColor;
        } 
</code></pre>

<p>But it didnt color anything in Red. Nothing changed.
I want to be able to color in Red for exmaple only the tokens[0] and in Green tokens[1] for example.</p>

<p>How can i do it ?</p>
