, , . List List<T> .Equals, Object.Equals, :
public static bool Equals(object objA, object objB)
{
return ((objA == objB) || (((objA != null) && (objB != null)) && objA.Equals(objB)));
}
And objA.Equals(objB)is virtual. If I remember correctly, the default implementation simply checks for reference equality (pointing to the same object in memory), so your code will return false.
source
share