Default Property
Collapse the table of content
Expand the table of content

EqualityComparer<T>.Default Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns a default equality comparer for the type specified by the generic argument.

Namespace:  System.Collections.Generic
Assembly:  mscorlib (in mscorlib.dll)

public static EqualityComparer<T> Default { get; }

Property Value

Type: System.Collections.Generic.EqualityComparer<T>
The default instance of the EqualityComparer<T> class for type T.

The Default property checks whether type T implements the System.IEquatable<T> generic interface and if so returns an EqualityComparer<T> that uses that implementation. Otherwise it returns an EqualityComparer<T> that uses the overrides of Object.Equals and Object.GetHashCode provided by T.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft