Calling x.Equals(y) on incomparable types will almost always return false. If two classes do not have a common parent class their instances are considered incomparable.

Carefully check the code for errors.

In this example both calls to the Equals method will always return false regardless of the contents of the ArrayList or String because ArrayLists and Strings are incomparable.

  • MSDN, Object.Equals Method.