title: Compare 2 objects to see if they are compatible in VB.NET
body: <p>I want to test if the 2 objects values can be compared. </p>
  
  <p>For example if I have a variable define as an object which contains a value of "A" and another variable defined as an object with a value of 0. (These must be defined as type Object.)</p>
  
  <p>When I do a simple compare <code>If Object1 &lt;&gt; Object2 Then</code> etc. I get an error.
  So how do I test to see if the objects are comparable? I have looked at TryCast , DirectCast, Ctype etc but cannot see how these can help.</p>
  
  <p>Any suggestions.</p>