title: Why do I need an extra cast when using the conditional operator?
body: <p>In C# I can assign a number (up to 255) directly to a variable of type byte:</p>
  
  <pre><code>byte red = 255;
  </code></pre>
  
  <p>However if I do this in a more complex statement with a conditional operator:</p>
  
  <pre><code>byte red = (redNode != null) ? byte.Parse(redNode.Value) : 255;
  </code></pre>
  
  <p>I get an error: "CS0266 Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?)".</p>
  
  <p>I need to explicitly do the cast to byte for the 255:</p>
  
  <pre><code>byte red = (redNode != null) ? byte.Parse(redNode.Value) : (byte)255;
  </code></pre>
  
  <p>Why is this cast needed?    </p>