Compares two byte arrays.

Namespace:  SGP.XUtility
Assembly:  SGP.XUtility (in SGP.XUtility.dll)
Version: 1.2.3019.18718

Syntax

C#
public static int Compare(
	byte[] a,
	byte[] b
)

Parameters

a
Type: array< System..::.Byte >[]()[]
The first byte array.
b
Type: array< System..::.Byte >[]()[]
The second byte array.

Return Value

Returns 0 if arrays are same, the value less than 0 if the first one is less than the second one, the value greater than 0 if the first one is greater than the second one.

Exceptions

ExceptionCondition
System..::.ArgumentNullException a is nullNothingnullptra null reference (Nothing in Visual Basic).
System..::.ArgumentNullException b is nullNothingnullptra null reference (Nothing in Visual Basic).

See Also