Posted By

christianjunk on 02/05/11


Tagged

compare lists


Versions (?)

Comparing two collections for equality


 / Published in: C#
 

URL: http://stackoverflow.com/questions/50098/comparing-two-collections-for-equality

This algorithm is O(N*logN)

  1. bool equal = oldList.OrderBy(i => i).SequenceEqual(newList.OrderBy(i => i));

Report this snippet  

You need to login to post a comment.