title: Better way to cast object to int
body: <p>This is probably trivial, but I can't think of a better way to do it. I have a COM object that returns a variant which becomes an object in C#. The only way I can get this into an int is </p>
  
  <pre><code>int test = int.Parse(string.Format("{0}", myobject))
  </code></pre>
  
  <p>Is there a cleaner way to do this? Thanks</p>