I have a ComboBox with two read only values: white fusion and silver fusion.
How do I get the correct method to run based on selecting each one in a ComboBox? The methods are just pulling an Integer from a SQL table and put it into a TextBox.
private void cboOilVehicle_SelectedIndexChanged(object sender, EventArgs e)
{
if (cboVehicle.SelectedIndexChanged == "White Fusion")
{
whiteFusionOil();
}
else
{
silverFusionOil();
}
}
Edit:
The name of the control must be
cboOilVehicle(Line 1) orcboVehicle(Line 3), it can’t be both. You have to decide which is correct