c# - Contains() method of List<T> -
In short, which methods in a class list & lt; T & gt; To operate
of
I have overloaded == in my class but it has no effect.
This will only call equals ()
- all that override (Or not, if you are happy with reference identification comparison) if type iequatable & lt; T & gt;
, then that implementation will be used in the priority of the normal identical
.
Specifically, for documentation from:
This method determines the similarity using the default similarity comparison
equality compass (t). The default for
T
, type of values in the list.
and from:
defaults
checks for the property to implement what typeT
IsSystem The IEquatable (T)
normal interface and if this happens, then aequity compairer (t)
which uses the implementation otherwise it is aequity compartment (t) < / Code> that uses the
object.
andT
provided by AVWOLSObject.GetHashCode
.
I do not believe it will use it at GetHashCode
at all.
Comments
Post a Comment