/ Published in: C#
URL: http://stackoverflow.com/questions/50098/comparing-two-collections-for-equality
This algorithm is O(N*logN)
Expand |
Embed | Plain Text
bool equal = oldList.OrderBy(i => i).SequenceEqual(newList.OrderBy(i => i));
You need to login to post a comment.
