SerializationInfo.GetInt64(String) SerializationInfo.GetInt64(String) SerializationInfo.GetInt64(String) SerializationInfo.GetInt64(String) Method

定义

SerializationInfo 存储中检索一个 64 位带符号整数值。Retrieves a 64-bit signed integer value from the SerializationInfo store.

public:
 long GetInt64(System::String ^ name);
public long GetInt64 (string name);
member this.GetInt64 : string -> int64
Public Function GetInt64 (name As String) As Long

参数

name
String String String String

与要检索的值关联的名称。The name associated with the value to retrieve.

返回

name 关联的 64 位带符号整数。The 64-bit signed integer associated with name.

异常

name 关联的值不能转换为 64 位带符号整数。The value associated with name cannot be converted to a 64-bit signed integer.

当前实例中没有找到具有指定名称的元素。An element with the specified name is not found in the current instance.

注解

如果该值为64位有符号整数, 或可以转换为一个, 则返回该值;否则, InvalidCastException将引发。If the value is a 64-bit signed integer, or can be converted to one, that value is returned; otherwise, a InvalidCastException is thrown. 所有转换都是通过与IFormatterConverterSerializationInfo关联的来完成的。All conversions are done by the IFormatterConverter associated with this SerializationInfo.

适用于