SerializationInfo.GetDouble(String) 方法

定义

SerializationInfo 存储中检索一个双精度浮点值。

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

与要检索的值关联的名称。

返回

Double

name 关联的双精度浮点值。

例外

namenull

name 关联的值不能转换为双精度浮点值。

当前实例中没有找到具有指定名称的元素。

注解

如果值为双精度值,或者可以转换为双精度值,则返回该值;否则,将引发 a InvalidCastException 。 所有转换由 IFormatterConverter 与此 SerializationInfo关联的操作完成。

适用于