Table of Contents

Class MemoryElementWiseComparer<T>

Namespace
LfrlAnvil
Assembly
LfrlAnvil.Core.dll

Defines methods to support the comparison of ReadOnlyMemory<T> objects for equality.

public sealed class MemoryElementWiseComparer<T> : IEqualityComparer<ReadOnlyMemory<T>>

Type Parameters

T

Element type.

Inheritance
MemoryElementWiseComparer<T>
Implements
Inherited Members
Extension Methods

Methods

Equals(ReadOnlyMemory<T>, ReadOnlyMemory<T>)

Determines whether the specified objects are equal.

[Pure]
public bool Equals(ReadOnlyMemory<T> x, ReadOnlyMemory<T> y)

Parameters

x ReadOnlyMemory<T>

The first object of type T to compare.

y ReadOnlyMemory<T>

The second object of type T to compare.

Returns

bool

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

GetHashCode(ReadOnlyMemory<T>)

Returns a hash code for the specified object.

[Pure]
public int GetHashCode(ReadOnlyMemory<T> obj)

Parameters

obj ReadOnlyMemory<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.