Difference between if statement ways...?
<p>I am trying to use the shorthand notation for an if statement to shorten the following:</p>

<pre><code>if (DCC.systemFlags[1]) { sf0CheckBox.Checked = true; } else { sf0CheckBox.Checked = false; }
</code></pre>

<p>And to use the following instead:</p>

<pre><code>DCC.systemFlags[1] ? sf1CheckBox.Checked = true : sf1CheckBox.Checked = false;
</code></pre>

<p>However, I am not sure why I am getting the following error:</p>

<p><code>Only assignment, call, increment, decrement, and new object expressions can be used as a statement</code></p>

<p>What is the correct way to write this?</p>

<p><code>DCC.systemFlags[]</code> is an array of <code>bools</code>.</p>

<p>Thank you.</p>
