0
Under review

Sort object by property before Compare

Allan Zeidler 4 years ago updated by Omer Raviv (CTO) 4 years ago 1

Hi, I love the compare object feature. However I have a huge problem when comparing a large number of objects in a list of objects.


Suppose that you have an object called product. You need to compare two lists of product objects. Need to find a list of different properties of object A and object B. However, list A comes sorted in a way different from list B. So, ozCode puts it side by side comparing object A with object X and object B with object K... so, I cannot compare the properties of the same product.

It would be good to sort the both lists before compare, so both list A and list B will by ordered by product_id and the properties can be compared right way.
Under review

Hi Allan! Thank you very much for your feedback! This is a great idea and we agree that having this functionality would make Compare more helpful.


As a workaround, for now, if you're using VS2015 and up (and the recent v2.1 Beta), you could accomplish this by:

1. Going into QuickWatch and evaluating productsA.OrderBy(p => p.product_id) and then triggering Compare on it

2. In the Compare candidate selector, type the following in as the 2nd comparison candidate: productsB.OrderBy(p => p.product_id)

3. Click "Compare"


If not all of the product_id's in productsA also appear in productsB, consider using the LINQ Join operator in order to get meaningful comparison results. We are considering adding support for this scenario as well in a future update of OzCode.