SerializationInfo.GetInt16(String) Metodo
Definizione
Recupera un intero con segno a 16 bit dall'archivio SerializationInfo.Retrieves a 16-bit signed integer value from the SerializationInfo store.
public:
short GetInt16(System::String ^ name);
public short GetInt16 (string name);
member this.GetInt16 : string -> int16
Public Function GetInt16 (name As String) As Short
Parametri
- name
- String
Nome associato al valore da recuperare.The name associated with the value to retrieve.
Restituisce
Intero con segno a 16 bit associato a name
.The 16-bit signed integer associated with name
.
Eccezioni
name
è null
.name
is null
.
Il valore associato al parametro name
non può essere convertito in un intero con segno a 16 bit.The value associated with name
cannot be converted to a 16-bit signed integer.
Non è possibile trovare un elemento con il nome specificato nell'istanza corrente.An element with the specified name is not found in the current instance.
Commenti
Se il valore è un intero con segno a 16 bit oppure può essere convertito in uno, viene restituito tale valore; in caso contrario InvalidCastException , viene generata un'eccezione.If the value is a 16-bit signed integer, or can be converted to one, that value is returned; otherwise, a InvalidCastException is thrown. Tutte le IFormatterConverter conversioni vengono eseguite dall'oggetto associato SerializationInfoa.All conversions are done by the IFormatterConverter associated with this SerializationInfo.