title: .Net - Cast or convert a boxed byte?, short? or int? to int?
body: <p>If I have an <code>object</code> reference that references a <code>byte?</code>, <code>short?</code> or <code>int?</code>, is there a way to unconditionally cast or convert that object reference to int? without writing separate code for each case?</p>
  
  <p>For example:</p>
  
  <pre><code>byte? aByte = 42; // .. or aByte = null
  object anObject = aByte;
  //...
  var anInt = (int?)anObject //As expected, doesn't work
  </code></pre>