title: LINQ: Determine if two sequences contains exactly the same elements
body: <p>I need to determine whether or not two sets contains exactly the same elements. The ordering does not matter.</p>
  
  <p>For instance, these two arrays should be considered equal:</p>
  
  <pre><code>IEnumerable&lt;int&gt; data = new []{3, 5, 6, 9};
  IEnumerable&lt;int&gt; otherData = new []{6, 5, 9, 3}
  </code></pre>
  
  <p>One set cannot contain any elements, that are not in the other.</p>
  
  <p>Can this be done using the built-in query operators? And what would be the most efficient way to implement it, considering that the number of elements could range from a few to hundreds?</p>