How to translate java "?" operator in C#?
<p>I would like to know the translation of this java code in C#</p>

<pre><code>n = (length &gt; 0) ? Math.min(length, buffer.length) : buffer.length;//Java code
</code></pre>

<p>Can it be equivalent to this in C# ?</p>

<pre><code>if(length &gt;0)
{
   n = Math.min(length, buffer.length);
}
else
{
   n = buffer.length;
}
</code></pre>
