SerializationInfo.GetUInt16(String) Méthode

Définition

Important

Cette API n’est pas conforme CLS.

Récupère une valeur entière 16 bits non signée du magasin SerializationInfo.

public:
 System::UInt16 GetUInt16(System::String ^ name);
[System.CLSCompliant(false)]
public ushort GetUInt16 (string name);
[<System.CLSCompliant(false)>]
member this.GetUInt16 : string -> uint16
Public Function GetUInt16 (name As String) As UShort

Paramètres

name
String

Nom associé à la valeur à récupérer.

Retours

UInt16

Entier 16 bits non signé associé à name.

Attributs

Exceptions

name a la valeur null.

La valeur associée à name ne peut pas être convertie en valeur entière 16 bits non signée.

Un élément portant le nom spécifié est introuvable dans l'instance actuelle.

Remarques

Si la valeur est un entier non signé 16 bits ou peut être convertie en un entier, cette valeur est retournée ; sinon, une InvalidCastException est levée. Toutes les conversions sont effectuées par l’associé IFormatterConverter à ce SerializationInfo.

S’applique à