Show / Hide Table of Contents

Class StructuralTypeEqualityComparer

Equality comparer for structural types.

Inheritance
System.Object
StructuralTypeEqualityComparer
Implements
System.Collections.Generic.IEqualityComparer<System.Type>
Namespace: System.Linq.CompilerServices
Assembly: Nuqleon.Linq.CompilerServices.dll
Syntax
public class StructuralTypeEqualityComparer : Object, IEqualityComparer<Type>

Constructors

StructuralTypeEqualityComparer()

Instantiates an equality comparer for structural types, using the default structural type comparator

Declaration
public StructuralTypeEqualityComparer()

StructuralTypeEqualityComparer(Func<StructuralTypeEqualityComparator>)

Instantiates an equality comparer for structural types.

Declaration
public StructuralTypeEqualityComparer(Func<StructuralTypeEqualityComparator> comparatorFactory)
Parameters
Type Name Description
System.Func<StructuralTypeEqualityComparator> comparatorFactory

A factory to get structural type comparator instances.

Properties

Default

A default instance of the equality comparer.

Declaration
public static StructuralTypeEqualityComparer Default { get; }
Property Value
Type Description
StructuralTypeEqualityComparer

Methods

Equals(Type, Type)

Checks whether two given types are equal.

Declaration
public bool Equals(Type x, Type y)
Parameters
Type Name Description
System.Type x

The left type.

System.Type y

The right type.

Returns
Type Description
System.Boolean

true if the given types are equal, false otherwise.

GetHashCode(Type)

Returns a hash code for the specified type.

Declaration
public int GetHashCode(Type obj)
Parameters
Type Name Description
System.Type obj

The type for which a hash code is to be returned.

Returns
Type Description
System.Int32

The hash code of the type.

Implements

System.Collections.Generic.IEqualityComparer<>
In This Article
Back to top Generated by DocFX