I have a bunch of combos loaded from a database. When I check the value of the combo to do something I don't want to do this.
Public Enum enSurfaceType
Asphalt = 0
Gravel = 1
End Enum
if cboSurfaceType.SelectedIndex = enSurfaceType.Asphalt then
or if cboSurfaceType.SelectedIndex = 0 then
...............
What else can I do so I don't have to hard code all these Enums for each combo box?
THX
Public Enum enSurfaceType
Asphalt = 0
Gravel = 1
End Enum
if cboSurfaceType.SelectedIndex = enSurfaceType.Asphalt then
or if cboSurfaceType.SelectedIndex = 0 then
...............
What else can I do so I don't have to hard code all these Enums for each combo box?
THX