SerializationInfo.GetDouble(String) SerializationInfo.GetDouble(String) SerializationInfo.GetDouble(String) SerializationInfo.GetDouble(String) Method

定義

SerializationInfo 存放區擷取雙精度浮點數值。Retrieves a double-precision floating-point value from the SerializationInfo store.

public:
 double GetDouble(System::String ^ name);
public double GetDouble (string name);
member this.GetDouble : string -> double
Public Function GetDouble (name As String) As Double

參數

name
String String String String

與要擷取的值相關聯的名稱。The name associated with the value to retrieve.

傳回

name 相關聯的雙精度浮點數值。The double-precision floating-point value associated with name.

例外狀況

name 相關聯的數值無法轉換為雙精度浮點數值。The value associated with name cannot be converted to a double-precision floating-point value.

在目前的執行個體中找不到具有指定名稱的項目。An element with the specified name is not found in the current instance.

備註

如果值為雙精度浮點數, 或可以轉換為 double, 則會傳回該值;否則, InvalidCastException就會擲回。If the value is a double, or can be converted to a double, that value is returned; otherwise, a InvalidCastException is thrown. 所有的轉換都是由IFormatterConverter與這個SerializationInfo相關聯的所完成。All conversions are done by the IFormatterConverter associated with this SerializationInfo.

適用於