title: What happens when you cast from short to byte in C#?
body: <p>I have the following code:</p>
  
  <pre><code>short myShort = 23948;
  byte myByte = (byte)myShort;
  </code></pre>
  
  <p>Now I wasn't expecting <code>myByte</code> to contain the value 23948. I would have guessed that it would contain 255 (I believe the largest value for a byte). </p>
  
  <p>However, it contains 140, and it made me wonder why; what is actually going on behind the scenes?</p>
  
  <p><em>Please note that I am not looking for someone to solve the problem that 23948 cannot fit into a byte, I am merely wondering about the underlying implementation</em></p>