How to separate condition-codes from mainForm to class? C#
<p>Related to these topics:</p>

<p><a href="http://stackoverflow.com/questions/15132363/color-code-from-class-to-form-condition">Color Code from Class to Form Condition</a></p>

<p><a href="http://stackoverflow.com/questions/15130780/how-to-connect-if-conditions-from-class-to-form">How to connect if conditions from class to form?</a></p>

<p>Sample (inside the void condition in mainform.cs):</p>

<pre><code>private void TextChangedEvent(object sender, EventArgs e)
{
    if (token == "//" || token.StartsWith("//"))
    {
        // Find the start of the comment and then extract the whole comment.
        int length = line.Length - (index - start);
        string commentText = rtb.Text.Substring(index, length);
        rtb.SelectionStart = index;
        rtb.SelectionLength = length;
        rtb.SelectionColor = Color.Green;
        rtb.SelectionFont = new Font("Courier New", 10, FontStyle.Italic);
        break;
    }
}
</code></pre>

<p>I want to separate this:</p>

<pre><code>rtb.SelectionColor = Color.Green;
rtb.SelectionFont = new Font("Courier New", 10, FontStyle.Italic);
</code></pre>

<p>Into a separate class [High.cs]</p>

<pre><code>namespace High
{
    class High
    {

    }
 }
</code></pre>

<p>Then call it again to the main form (color codes string?)</p>

<p>What should I do?</p>
