You can create a set and then use HashSet<T>.SetEquals . It's not strictly LINQ, but it plays great with it :)
Of course, you can easily write your own extension method to extend it. Something like that:
public static bool SetEquals<T>(this IEnumerable<T> source, IEnumerable<T> other) { HashSet<T> hashSet = new HashSet<T>(source); return hashSet.SetEquals(other);
EDIT: As noted in the comments, this ignores the number of times the elements occur, as well as the order - so { 1, 2 } will be "set equal" to { 1, 2, 1, 2, 1, 1, 1 } . If this is not what you want, it will be a little harder.
Jon skeet
source share