Compare two Lists for differences

前端 未结 5 999
逝去的感伤
逝去的感伤 2020-11-27 13:04

I would like some feedback on how we can best write a generic function that will enable two Lists to be compared. The Lists contain class objects and we would like to iterat

5条回答
  •  隐瞒了意图╮
    2020-11-27 13:37

    This approach from Microsoft works very well and provides the option to compare one list to another and switch them to get the difference in each. If you are comparing classes simply add your objects to two separate lists and then run the comparison.

    http://msdn.microsoft.com/en-us/library/bb397894.aspx

提交回复
热议问题