Other than stepping through the elements one by one, how do I compare two lists of strings for equality (in .NET 3.0):
This fails:
// Expected re
Using Linq and writing the code as an extension method :
public static bool EqualsOtherList(this List thisList, List theOtherList)
{
if (thisList == null || theOtherList == null ||
thisList.Count != theOtherList.Count) return false;
return !thisList.Where((t, i) => !t.Equals(theOtherList[i])).Any();
}