Short.Compare(Int16, Int16) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
數值比較兩個 short 數值。
[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
參數
- x
- Int16
第一個 short 比較
- y
- Int16
第二個 short 比較
傳回
值為0若;x == y值小0於若;x < y值大於若0x > y
- 屬性
備註
數值比較兩個 short 數值。 回傳的值與以下者相同:
Short.valueOf(x).compareTo(Short.valueOf(y))
在 1.7 版本中加入。
Java 文件 java.lang.Short.compare(short, short)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。