Are inline if statements efficient when used in this way?
<p>If I assign a value to a variable and then want to assign a second value to it, but only if it fulfills a condition, is it just as efficient to use a shorthand if statement? Here is an example.</p>

<p>Is this more efficient</p>

<pre><code>int x = GetInt();
if (x &lt; 5)
    x = 5;
</code></pre>

<p>Than this</p>

<pre><code>int x = GetInt();
x = x &lt; 5 ? 5 : x;
</code></pre>

<p>I suppose that what I'm really asking is if <code>x</code> does not satisfy the condition then will the <code>x = x</code> in the else statement impact the performance?</p>
