語言

Int32.Sign(Int32) 方法

定義

計算值的符號。

public:
 static int Sign(int value) = System::Numerics::INumber<int>::Sign;
public static int Sign(int value);
static member Sign : int -> int
Public Shared Function Sign (value As Integer) As Integer

參數

value
Int32

要計算符號的值。

傳回

當 value 為正值時 Zerovalue ,若為零,則為負值 value 。

實作

備註

建議 一個函數分別回傳 1、 0和 -1。

適用於