Mattias said:
If the type overrides the Object.Equals method (and it should if it
supports value comparison), you can call that.
If it also overloads the equality operator (== in C#) you can also
consider using that.
Mattias
I don't see any short cut method of doing the comparison, once you
establish the object types are equal with an "is" comparison.
At that point, unless you have some prior knowledge of the data structure
of the objects -- and I think the OP is implying that you don't -- I think
you would have to use Reflection to enumerate all the members of the
object.
Then, based on the type of each member, you would then have to do a
comparison. [ For example, take two ADODB record sets. Is there a
simple way to ask whether one completely equals the other? ]
And, objects can have other objects as members which can have their own
members that can be values, references, other objects and so on.