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
xandy, as shown in the following table.Value Meaning Less than zero xis less thany.Zero xequalsy.Greater than zero xis 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
objis a reference type andobjis null.