How is it possible to optimize this code segment in general?
string[] str = { solution, answer }; richTextBox1.Lines = str; richTextBox1.Select(0, str[0].Length); richTextBox1.SelectionColor = Properties.Settings.Default.FontColor; richTextBox1.Select(str[0].Length, str[1].Length + 1); richTextBox1.SelectionFont = new Font(richTextBox1.Font, FontStyle.Bold);
str[0]
,str[1]
when you could use thesolution
,answer
:) - Grundy