In the C# Language Specification Version 4, 1.6.7.5 Operators is information about List operators: == and !=. But I can\'t fi
The spec is indeed correct, although confusing. The spec defines a class called List (poor naming choice).
The following table shows a generic class called List, which implements a growable list of objects. The class contains several examples of the most common kinds of function members.
This class can be seen in the spec at section 1.6.7. The Equals operator is overloaded and matches the output explained above. Perhaps a better name should have been chosen for that class.
static bool Equals(List a, List b) {
if (a == null) return b == null;
if (b == null || a.count != b.count) return false;
for (int i = 0; i < a.count; i++) {
if (!object.Equals(a.items[i], b.items[i])) {
return false;
}
}
return true;
}