SerializationInfo.GetInt16(String) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Récupère une valeur entière signée 16 bits à partir du SerializationInfo magasin.
public:
short GetInt16(System::String ^ name);
public short GetInt16(string name);
member this.GetInt16 : string -> int16
Public Function GetInt16 (name As String) As Short
Paramètres
- name
- String
Nom associé à la valeur à récupérer.
Retours
Entier signé 16 bits associé à name.
Exceptions
name a la valeur null.
La valeur associée name ne peut pas être convertie en entier signé 16 bits.
Un élément portant le nom spécifié est introuvable dans l’instance actuelle.
Remarques
Si la valeur est un entier signé 16 bits ou peut être convertie en un entier signé, cette valeur est retournée ; sinon, un InvalidCastException est levée. Toutes les conversions sont effectuées par l’associé IFormatterConverter à ce SerializationInfo.