I have two RadioButton
s: r1 and r2.
I have to enable both on Enabled = true
and disable only unchecked on Enabled = false
public bool Enabled
{
set
{
if(value)
{
r1.Enabled = value; // true
r2.Enabled = value;
}
else
{
if(!r1.Checked)
{
r1.Enabled = value; // false if not checked
}
if(!r2.Checked)
{
r2.Enabled = value;
}
}
}
}
Which operator have I to use to write each condition in one string?