Short.Compare(Int16, Int16) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compares two short
values numerically.
[Android.Runtime.Register("compare", "(SS)I", "")]
public static int Compare (short x, short y);
[<Android.Runtime.Register("compare", "(SS)I", "")>]
static member Compare : int16 * int16 -> int
Parameters
- x
- Int16
the first short
to compare
- y
- Int16
the second short
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 short
values numerically. The value returned is identical to what would be returned by:
Short.valueOf(x).compareTo(Short.valueOf(y))
Added in 1.7.
Java documentation for java.lang.Short.compare(short, short)
.
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.