问一个简单问题阿, 想根据i值(Int)不同的区间,来定义ibatch的值(int),用了switch ,但总是说 case i >= 0 && i <= 3000: 不能将布尔类型转换int。为什么啊
C# code
switch (ibatch)
{
case i >= 0 && i <= 3000:
ibatch=1;
break;
case i>3000 && i<=6000:
ibatch = 2;
break;
case i > 6000 && i <= 9000:
ibatch = 3;
break;
case i > 9000 && i <= 12000:
ibatch = 4;
break;
case i > 12000 && i <= 15000:
ibatch = 5;
break;
case i > 15000 && i <= 18000:
ibatch = 6;
break;
}