Mohl by mi někdo prosím poradit, jak zjednodušit tento kod?
private void data1_SelectedIndexChanged(object sender, EventArgs e)
{
int[] hodnoty1 = new int[2] { 1, 2 };
data_1 = hodnoty1[prouzek1.SelectedIndex];
if (data_1 == 1)
prouzek1.BackColor = System.Drawing.Color.Peru;
if (data_1 == 2)
prouzek1.BackColor = System.Drawing.Color.Orange;
}