XmlConvert.ToUInt16(String) Metod

Definition

Viktigt!

Detta API uppfyller inte CLS.

Konverterar String till en UInt16 motsvarighet.

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

Parametrar

s
String

Sträng som ska konverteras.

Returer

En UInt16 motsvarighet till strängen.

Attribut

Undantag

s är null.

s är inte i rätt format.

s representerar ett tal som är mindre än UInt16.MinValue eller större än UInt16.MaxValue.

Gäller för