title: Why C# fails to compare two object types with each other but VB doesn't?
body: <p>I have two objects in C# and don't know if it's Boolean or any other type.
  However when I try to compare those C# fails to give the right answer.
  I have tried the same code with VB.NET and that did it !</p>
  
  <p>Can anyone tell me how to fix this if there is a solution ?</p>
  
  <p>C#:</p>
  
  <pre><code>object a = true;
  object b = true;
  object c = false;
  if (a == b) c = true;
  MessageBox.Show(c.ToString()); //Outputs False !!
  </code></pre>
  
  <p>VB.NET:</p>
  
  <pre><code>Dim a As Object = True
  Dim b As Object = True
  Dim c As Object = False
  If (a = b) Then c = True
  MessageBox.Show(c.ToString()) '// Outputs True
  </code></pre>