There are two lists of string
List A;
List B;
What is the shortest code you would suggest to check that A.Count ==
If you don't need to worry about duplicates:
bool equal = new HashSet(A).SetEquals(B);
If you are concerned about duplicates, that becomes slightly more awkward. This will work, but it's relatively slow:
bool equal = A.OrderBy(x => x).SequenceEquals(B.OrderBy(x => x));
Of course you can make both options more efficient by checking the count first, which is a simple expression. For example:
bool equal = (A.Count == B.Count) && new HashSet(A).SetEquals(B);
... but you asked for the shortest code :)