ObjectsComparer icon indicating copy to clipboard operation
ObjectsComparer copied to clipboard

Compare always returns true (is equal)?

Open tekeroth-snapcode opened this issue 1 year ago • 1 comments

I might have missed something important, but this does not seem to work at all for me?

The Compare method seems to return true (is equal) all the time, regardless if they objects are different or not. Here are two screenshots that shows this:

image In the image above, we can see that firstObject.IsReturnBooking is true, and secondCopy.IsReturnBooking is false.

If I then step one more line, and look at the isEqual and differences, they show that the objects are equal, no changes detected:

image

I am running .NET 7 in Visual Studio 2022, version of lib used is 1.4.1

tekeroth-snapcode avatar Aug 21 '23 10:08 tekeroth-snapcode

Can you please provide the definition of Booking?

To troubleshoot you can:

  1. Create 2 bookings and try to compare them (no deserialization).
  2. If the previous step works, create 2 JSON files with different bookings, deserialize and try to compare (no random property changes)

Try to create a minimal example that returns true when objects are different and include all code of that example.

ValeraT1982 avatar Aug 23 '23 07:08 ValeraT1982