SerializationInfo.GetSByte(String) 方法

定义

重要

此 API 不符合 CLS。

SerializationInfo 存储中检索一个 8 位带符号整数值。

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

参数

name
String

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

返回

SByte

name 关联的 8 位带符号整数。

属性

例外

namenull

name 关联的值不能转换为 8 位带符号整数。

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

注解

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

适用于