Try this –
var brushes = new []{new SolidBrush(Color.Red), new SolidBrush(Color.Green)};
for (int i = 0; i < m_text.Lenght; i++)
{
... //other codes
e.Graphics.DrawString(test, drawFonts1, brushes [i % 2], pt);
}
2
solved How can i read from string[] each second line? [closed]