XmlConvert.ToUInt16(String) 方法

定义

重要

此 API 不符合 CLS。

String将转换为等效项UInt16

public:
 static System::UInt16 ToUInt16(System::String ^ s);
[System.CLSCompliant(false)]
public static ushort ToUInt16(string s);
[<System.CLSCompliant(false)>]
static member ToUInt16 : string -> uint16
Public Shared Function ToUInt16 (s As String) As UShort

参数

s
String

要转换的字符串。

返回

UInt16字符串的等效项。

属性

例外

snull

s 格式不正确。

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

适用于