title: How to cast from Object to Integer in VB.NET?
body: <p>How should I cast from an <code>Object</code> to an <code>Integer</code> in VB.NET?</p>
  
  <p>When I do:</p>
  
  <pre><code>Dim intMyInteger as Integer = TryCast(MyObject, Integer)
  </code></pre>
  
  <p>it says:</p>
  
  <blockquote>
    <p>TryCast operand must be reference type, but Integer is a value type.</p>
  </blockquote>