语言

Int16.Sign(Int16) 方法

定义

计算值的符号。

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

参数

value
Int16

要计算其符号的值。

返回

如果 value 为正值, Zero 则 value 为零,如果为负值,则为负值 value 。

实现

注解

建议分别返回10函数和-1函数。

适用于