HexBinary.Compare MethodHexBinary.Compare MethodHexBinary::Compare Method

Compares a byteBytebyte array with another byteBytebyte array.

Syntax

Public Shared Function Compare( _
    bytes1 As Byte[], _
    bytes2 As Byte[] _
) As Integer
public static int Compare(
    byte[] bytes1,
    byte[] bytes2
)
public:
static int Compare(
    array<byte> bytes1, 
    array<byte> bytes2
)
 

Parameters

bytes1

Type: System.Byte[]System.Byte()array<System::Byte>^

The first byteBytebyte array to compare.

bytes2

Type: System.Byte[]System.Byte()array<System::Byte>^

The second byteBytebyte array to compare.

Return Value

Type: System.Int32System.Int32System::Int32

A signed number that indicates the relative order of bytes1 and bytes2. The return value has the following meanings:

  • Less than zero indicates that bytes1 is less than bytes2.
  • Zero indicates that bytes1 is equal to bytes2.
  • Greater than zero indicates that bytes1 is greater than bytes2.