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
TElement 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
xReadOnlyMemory<T>The first object of type
Tto compare.yReadOnlyMemory<T>The second object of type
Tto compare.
Returns
GetHashCode(ReadOnlyMemory<T>)
Returns a hash code for the specified object.
[Pure]
public int GetHashCode(ReadOnlyMemory<T> obj)
Parameters
objReadOnlyMemory<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
objis a reference type andobjis null.