title: How does the C# conditional operator ? evaluate when used in pairs
body: <p>I'm trying to figure out what this code does in C# I'm not that familiar with the ? operator and this usage is confusing me. 
  I know that if I do something like this.</p>
  
  <pre><code>Result = ans &gt; 0 ? string.IsNullOrWhiteSpace(line[0]) : "";
  </code></pre>
  
  <p>It boils down to this:</p>
  
  <pre><code>if(ans &gt; 0)
      Result = string.IsNullOrWhiteSpace(line[0]);
  else 
      Result = "";
  </code></pre>
  
  <p>However I don't understand what happens when the line is like this instead:</p>
  
  <pre><code>Result = ans &gt; 0 
         ? string.IsNullOrWhiteSpace(line[0]) 
         ? ""
         : line[0].Trim().ToUpper() 
         : "";
  </code></pre>
  
  <p>When it is written this way does it just pair the ? and with the first : it comes to? That doesn't really make sense because Result can only have one value. Hopefully this makes sense I tried to condense the code down to just the problem I am having so that it is easy to understand. Let me know if I'm not clear enough. </p>