you can also do this:
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (chkYes.Checked)
{
regionRate = rate[cboReg.SelectedIndex];
displayRate();
}
}
Edit:
if you want that to happen on checkbox's check change event remove all code from comboBox1_SelectedIndexChanged event and paste it to chkYes_checkedChanged method. like this:
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void chkYes_CheckedChanged(object sender, EventArgs e)
{
if (chkYes.Checked && cboReg.SelectedIndex >= 0)
{
regionRate = rate[cboReg.SelectedIndex];
displayRate();
}
}
Thanks,
Hemant