SerializationInfo.GetDecimal(String) Methode
Definition
Ruft einen Decimal-Wert aus dem SerializationInfo-Speicher ab.Retrieves a decimal value from the SerializationInfo store.
public:
System::Decimal GetDecimal(System::String ^ name);
public decimal GetDecimal (string name);
member this.GetDecimal : string -> decimal
Public Function GetDecimal (name As String) As Decimal
Parameter
- name
- String
Der dem abzurufenden Wert zugeordnete Name.The name associated with the value to retrieve.
Gibt zurück
Ein Decimal-Wert aus der SerializationInfo.A decimal value from the SerializationInfo.
Ausnahmen
name
ist null
.name
is null
.
Der dem name
zugeordnete Wert kann nicht in einen Decimal-Wert konvertiert werden.The value associated with name
cannot be converted to a decimal.
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 ein Dezimalwert ist oder in einen Dezimalwert konvertiert werden kann, wird dieser Wert zurückgegeben. Andernfalls wird eine InvalidCastException ausgelöst.If the value is a decimal, or can be converted to a decimal, that value is returned; otherwise, a InvalidCastException is thrown. Alle Konvertierungen werden von dem IFormatterConverter durchgeführt, SerializationInfoder diesem zugeordnet ist.All conversions are done by the IFormatterConverter associated with this SerializationInfo.