SerializationInfo.GetString(String) SerializationInfo.GetString(String) SerializationInfo.GetString(String) SerializationInfo.GetString(String) Method

定义

String 存储中检索一个 SerializationInfo 值。Retrieves a String value from the SerializationInfo store.

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

参数

name
String String String String

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

返回

name 关联的 StringThe String associated with name.

异常

name 关联的值不能转换为 StringThe value associated with name cannot be converted to a String.

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

注解

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

适用于