Class ByteArrayEqualityComparer
- Namespace
- AsmResolver
- Assembly
- AsmResolver.dll
Provides an implementation to compare byte arrays for equality.
public class ByteArrayEqualityComparer : IEqualityComparer<byte[]>, IComparer<byte[]>
- Inheritance
-
ByteArrayEqualityComparer
- Implements
- Inherited Members
Properties
Instance
Gets the singleton instance of this comparer.
public static ByteArrayEqualityComparer Instance { get; }
Property Value
Methods
Compare(byte[]?, byte[]?)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public int Compare(byte[]? x, byte[]? y)
Parameters
Returns
- int
A signed integer that indicates the relative values of
x
andy
, as shown in the following table.Value Meaning Less than zero x
is less thany
.Zero x
equalsy
.Greater than zero x
is greater thany
.
Equals(byte[]?, byte[]?)
Determines whether the specified objects are equal.
public bool Equals(byte[]? x, byte[]? y)
Parameters
Returns
GetHashCode(byte[])
Returns a hash code for the specified object.
public int GetHashCode(byte[] obj)
Parameters
Returns
- int
A hash code for the specified object.
Exceptions
- ArgumentNullException
The type of
obj
is a reference type andobj
is null.