If statement syntax

Nov 12 2007 7:17 AM
I have a checkbox that depending on the checked state I will perform different operations.

I know one option is avaiable;

If (chk.Checked)
{
}
else
{
}

But I also know I can use something smilar to;

if chk.Checked(true) ? DoJob1 : DoJob2

The problem is that I can't get this second option to work. Can somebody please explain to me where and when the second example could be used?

Answers (1)