title: Comparing two lists(of Integer) for equality
body: <p>I know this very similar question has been asked before quite a few times such as in <a href="https://stackoverflow.com/questions/50098/comparing-two-collections-for-equality">Comparing two collections for equality irrespective of the order of items in them</a>, but I'm trying to use the solutions I'm reading there and something is not working... This HAS to be a stupid mistake I'm making... Please help!!</p>
  
  <p>Ok, so, here's my scenario, suppose I have the following 3 lists created in code:</p>
  
  <pre><code>Dim lst1 as new list(of integer)
  Dim lst2 as new list(of integer)
  Dim lst3 as new list(of integer)
  </code></pre>
  
  <p>And then, within the code I end up with, say, the following values in the lists:</p>
  
  <pre><code>lst1:    lst2:    lst3:
  1        1        2
  2        2        3
  3        3        4
  4        4        5
  </code></pre>
  
  <p>So, obviously, lst1 &amp; lst2 are equal and lst1 &amp; lst3 are not, but what code can I write into my if statement to verify this?</p>
  
  <p>I've tried:</p>
  
  <pre><code>lst1.SequenceEqual(lstXX)
  </code></pre>
  
  <p>And that returns <strong>True</strong> for both lst2 and lst3
  I've tried:</p>
  
  <pre><code>lst1.Equals(lstXX)
  </code></pre>
  
  <p>And that returns <strong>False</strong> for both lst2 and lst3</p>
  
  <p>Now, I know I could do it with code comparing count and lst1.Except(lstXX), but I'm wondering more so what I'm doing wrong here and even more importantly, what is the most efficient method to do this??</p>
  
  <p>Thanks!!!</p>