title: C# int- or object-to-double casting error explanation
body: <p>The below code fails at the last assignment:</p>
  
  <pre><code>static void Main(string[] args)
  {
      int a = 5;
      object b = 5;
  
      System.Diagnostics.Debug.Assert( a is int &amp;&amp; b is int );
  
      double x = (double)a;
      double y = (double)b;
  }
  </code></pre>
  
  <p>If both a and b are <code>int</code>, what is the cause of this error?</p>