maybe you could help me to come up for the best way of comparing to object arrays. Lets say I make two arrays of objects: List<SomeObject> Object1 and List<SomeObject> object2. If I compare them by ==, then obviously it compares only reference of those two objects. I used standard solution - compare every field of those two objects. The problem is that I have method with lots of nested if/else and foreach statements now, and it is very hard to read. Is there another way besides getting to the root fields of every collection/object in the objects that I want to compare ? I thougth to refactor this huge method to smaller methods, but just trying that made me feel even worse about re-reading the code :)
by the way objects are from outsource (webservice in particular) so no IComparable could be implemented whatsoever.
Thanks for your help