XmlConvert.ToInt16(String) 方法

定义

String将转换为等效项Int16

public:
 static short ToInt16(System::String ^ s);
public static short ToInt16(string s);
static member ToInt16 : string -> int16
Public Shared Function ToInt16 (s As String) As Short

参数

s
String

要转换的字符串。

返回

字符串 Int16 的等效项。

例外

snull

s 格式不正确。

s 表示小于 Int16.MinValue 或大于 Int16.MaxValue 的数字。

适用于