.net - Combo Box Drop down list to change a variable -


i creating program drop down-list combo box contain items: a,b,cand d.

what want is, when select item in combobox , click button, x variable change. example when select b in combobox, x value change 2.

i need variable function. how can change x variable?

if combobox1.selecteditem.tostring = "a"     x = 1 elseif combobox1.selecteditem.tostring = "b"     x = 2 elseif combobox1.selecteditem.tostring = "c"     x = 3 elseif combobox1.selecteditem.tostring = "d"     x = 4 end if 

assuming x integer


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -