in c sharp
win-forms
i have added a combo box control to my form
and added items accordingly into the combo box
m trying to the item on select-index is assigned to a string which is passed as parameter to function declared in the following manner:
private void cmbPayment_SelectedIndexChanged(object sender, EventArgs e)
{
string pm = cmbLocation.SelectedItem.ToString();
payment(pm);
}
THE FUNCTION:
public void payment(string pym)
{
jd.PaymentMode = pym;
}
Looks to me like “cmbLocation” should be “cmbPayment” ?