语言

UInt16.Sign(UInt16) 方法

定义

计算值的符号。

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

参数

value
UInt16

要计算其符号的值。

返回

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

实现

注解

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

适用于