title: Why is my addition of 2 shorts causing a casting compile error due to ints?
body: <p>In my code i have the following code:</p>
  
  <pre><code>Order = config.DeploymentSteps.Select(x =&gt; x.Order).DefaultIfEmpty().Max() + 1;
  </code></pre>
  
  <p>This gives me the error <code>Cannot implicitly convert type 'int' to 'short'</code>.  As a Reference <code>Order</code> and <code>x.Order</code> are both shorts, and <code>Max()</code> is correctly returning a <code>short</code> (I have verified this).  So I get it, it thinks the <code>1</code> is an <code>integer</code> and erroring.  So I changed it to:</p>
  
  <pre><code>Order = config.DeploymentSteps.Select(x =&gt; x.Order).DefaultIfEmpty().Max() + (short)1;
  </code></pre>
  
  <p>I'm now still getting the same compile.  So maybe it's not casting it right, so I tried changing it to </p>
  
  <pre><code>Order = config.DeploymentSteps.Select(x =&gt; x.Order).DefaultIfEmpty().Max() + Convert.ToInt16(1);
  </code></pre>
  
  <p>Yet I still get the same error.  Finally I got it to work by converting the whole expression:</p>
  
  <pre><code>Order = Convert.ToInt16(config.DeploymentSteps.Select(x =&gt; x.Order).DefaultIfEmpty().Max() + 1);
  </code></pre>
  
  <p>Why can't I cast the 1 to a <code>short</code> and add it to another short, without casting the whole thing?</p>