Byte.Compare(SByte, SByte) Method

Definition

Compares two byte values numerically.

[Android.Runtime.Register("compare", "(BB)I", "")]
public static int Compare (sbyte x, sbyte y);
[<Android.Runtime.Register("compare", "(BB)I", "")>]
static member Compare : sbyte * sbyte -> int

Parameters

x
SByte

the first byte to compare

y
SByte

the second byte to compare

Returns

the value 0 if x == y; a value less than 0 if x < y; and a value greater than 0 if x > y

Attributes

Remarks

Compares two byte values numerically. The value returned is identical to what would be returned by:

Byte.valueOf(x).compareTo(Byte.valueOf(y))

Added in 1.7.

Java documentation for java.lang.Byte.compare(byte, byte).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to