你可以使用一个范围来比较组合框中的selectedindex吗?

时间:2015-12-16 16:52:00

标签: vb.net combobox

我有一个从数据库中的值绑定的组合框,我想检查selectedindex是否为0 - 5然后根据它做一些事情。

我知道我可以使用

if cboTrainingType.selectedindex = 0 or cboTrainingType.selectedindex = 1 or .....

我想知道是否有办法只指定cboTrainingType.selectedindex =范围(0,5)或类似的东西?

0 个答案:

没有答案