我尝试使用 && 但它似乎不起作用,这就是我现在所拥有的
public void checkbox1_CheckedChanged(object sender, EventArgs e)
{
if (checkbox2.Checked)
{
}else if (checkbox3.Checked)
{
}else if (checkbox2.Checked && checkbox3.Checked)
{
//this doesnt seem to work just executes the code in one of the two if statements above//
}
else
{
}
}
如果同时选中这两个复选框(checkbox2 和 checkbox3),我想让它运行一些代码,但是 && 运算符似乎对此不起作用,至少在我的情况下