if (count > 0)
{
this.control.Enabled = false;
}
else
{
this.control.Enabled = true;
}
// this is 1 line compared to what we have above.
this.control.Enabled = (count <= 0);
if (count > 0)
{
this.control.Enabled = false;
}
else
{
this.control.Enabled = true;
}
// this is 1 line compared to what we have above.
this.control.Enabled = (count <= 0);