If the objects are serializable, you can serialize them and then compare the serialized versions.
You can use this XmlSerialize extension method to handle serialization.
For example, when comparing Cat instances, the following psuedo code demonstrates this
var expected = GetExpectedInstance();
user2985029
source share