Use dropdown list in windows form to install application

  Kiến thức lập trình

I am stuck at the point of this form/kiosk I am creating so users can pick from a dropdown list. I already created the form and populated the list. What I am having trouble with is how to pass the selection to the button that is clicked to perform the installation. I know it has something to do with selectedIndexChanged, and I guess there would need to be an If statement tied to a function of some sort. I only need one example of “if choice A is selected, then when button is pressed, A gets installed”. I know how to create a function and pass it to the button, I am just lost when doing it from a dropdown list.

Already created main form. Searched online for examples.