Table of Contents

Class ArrayContentComparer<T>

Namespace
Rinku.Mapping
Assembly
Rinku.dll

Compares arrays by their contents rather than by reference, so two arrays with equal elements are equal.

public sealed class ArrayContentComparer<T> : IEqualityComparer<T[]> where T : struct

Type Parameters

T
Inheritance
ArrayContentComparer<T>
Implements
Inherited Members
Extension Methods

Fields

Instance

The reusable instance

public static readonly ArrayContentComparer<T> Instance

Field Value

ArrayContentComparer<T>

Methods

Equals(T[]?, T[]?)

Determines whether the specified objects are equal.

public bool Equals(T[]? x, T[]? y)

Parameters

x T[]

The first object of type T to compare.

y T[]

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

GetHashCode(T[])

Returns a hash code for the specified object.

public int GetHashCode(T[] obj)

Parameters

obj T[]

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

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.