C# Bool Query

bool lDebug = false;

if(lDebug);
{
MessageBox.Show("JobNum: " + sJobNo + "\nPart No: " + sPartNo + "\nQty: " + nQty);
}

WHY WOULD THIS MESSAGE BOX ALWAYS SHOW?? I’ve done a ToString() on lDebug, and that does indeed say false. But the message box always displayed, whether lDebug is set to true or false!

Ideas please…!

Take out the semi-colon after the IF condition

correct

this is a stand alone line:
if(foo);

These are stand alone lines:
{
msgbox();
}

so the computer executes the if… says nothing to do after the check so moves to next set of lines.
Oh, you want me to show a message box.