我有这段代码,但我不明白为什么我不能使用运算符 || 在这个例子中。
“操作员'||' 不能应用于“bool”和“int”类型的操作数”
我错过了什么吗?这个布尔值在哪里?
int i = 1;
if ( i == 1)
{
Response.Write("-3");
}
else if (i == 5 || 3) //this is the error, but where is the bool?
{
Response.Write("-2");
}