Class ListComparer<T>
Compares two lists (ordered collections which may contain duplicates) for equality.
Inheritance
System.Object
ListComparer<T>
Implements
System.Collections.Generic.IEqualityComparer<System.Collections.Generic.IEnumerable<T>>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Virtlink.Utilib.Collections
Assembly: Virtlink.Utilib.dll
Syntax
public sealed class ListComparer<T> : IEqualityComparer<IEnumerable<T>>
Type Parameters
Name | Description |
---|---|
T | The type of elements in the lists. |
Constructors
| Improve this Doc View SourceListComparer()
Initializes a new instance of the ListComparer<T> class.
Declaration
public ListComparer()
ListComparer(IEqualityComparer<T>)
Initializes a new instance of the ListComparer<T> class.
Declaration
public ListComparer(IEqualityComparer<T> elementComparer)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEqualityComparer<T> | elementComparer | The comparer used to compare elements. |
Properties
| Improve this Doc View SourceDefault
Returns a default instance of the ListComparer<T>.
Declaration
public static ListComparer<T> Default { get; }
Property Value
Type | Description |
---|---|
ListComparer<T> | The default instance of the ListComparer<T> class for type |
Methods
| Improve this Doc View SourceEquals(IEnumerable<T>, IEnumerable<T>)
Declaration
public bool Equals(IEnumerable<T> x, IEnumerable<T> y)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | x | |
System.Collections.Generic.IEnumerable<T> | y |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode(IEnumerable<T>)
Declaration
public int GetHashCode(IEnumerable<T> enumerable)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | enumerable |
Returns
Type | Description |
---|---|
System.Int32 |
Implements
System.Collections.Generic.IEqualityComparer<T>