标签: vb.net combobox
我有一个从数据库中的值绑定的组合框,我想检查selectedindex是否为0 - 5然后根据它做一些事情。
我知道我可以使用
if cboTrainingType.selectedindex = 0 or cboTrainingType.selectedindex = 1 or .....
我想知道是否有办法只指定cboTrainingType.selectedindex =范围(0,5)或类似的东西?