SerializationInfo.GetSByte(String) SerializationInfo.GetSByte(String) SerializationInfo.GetSByte(String) SerializationInfo.GetSByte(String) Method

定义

重要

此 API 不符合 CLS。

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

public:
 System::SByte GetSByte(System::String ^ name);
[System.CLSCompliant(false)]
public sbyte GetSByte (string name);
member this.GetSByte : string -> sbyte
Public Function GetSByte (name As String) As SByte

参数

name
String String String String

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

返回

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

异常

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

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

注解

如果值为Int8,或者可以转换成Int8,该值是返回; 否则为InvalidCastException引发。If the value is an Int8, or can be converted to an Int8, that value is returned; otherwise, a InvalidCastException is thrown. 所有转换都由IFormatterConverter与此相关SerializationInfoAll conversions are done by the IFormatterConverter associated with this SerializationInfo.

适用于