SerializationInfo.GetUInt16(String) Methode
Definition
Wichtig
Diese API ist nicht CLS-kompatibel.
Ruft den Wert einer 16-Bit-Ganzzahl ohne Vorzeichen aus dem SerializationInfo-Speicher ab.Retrieves a 16-bit unsigned integer value from the SerializationInfo store.
public:
System::UInt16 GetUInt16(System::String ^ name);
public ushort GetUInt16 (string name);
[System.CLSCompliant(false)]
public ushort GetUInt16 (string name);
member this.GetUInt16 : string -> uint16
[<System.CLSCompliant(false)>]
member this.GetUInt16 : string -> uint16
Public Function GetUInt16 (name As String) As UShort
Parameter
- name
- String
Der dem abzurufenden Wert zugeordnete Name.The name associated with the value to retrieve.
Gibt zurück
Die 16-Bit-Ganzzahl ohne Vorzeichen, die name
zugeordnet ist.The 16-bit unsigned integer associated with name
.
- Attribute
Ausnahmen
name
ist null
.name
is null
.
Der Wert, dem der name
zugeordnet ist, kann nicht in eine 16-Bit-Ganzzahl ohne Vorzeichen konvertiert werden.The value associated with name
cannot be converted to a 16-bit unsigned integer.
In der aktuellen Instanz wurde kein Element mit dem angegebenen Namen gefunden.An element with the specified name is not found in the current instance.
Hinweise
Wenn der Wert eine 16-Bit-Ganzzahl ohne Vorzeichen ist oder in einen Wert konvertiert werden kann, wird dieser Wert zurückgegeben. Andernfalls wird eine ausgelöst InvalidCastException .If the value is a 16-bit unsigned integer, or can be converted to one, that value is returned; otherwise, a InvalidCastException is thrown. Alle Konvertierungen werden von dem durchgeführt, der IFormatterConverter diesem zugeordnet ist SerializationInfo .All conversions are done by the IFormatterConverter associated with this SerializationInfo.