MissingMemberException.GetObjectData(SerializationInfo, StreamingContext) 方法

定义

用类名、成员名、缺少成员的签名和其他异常信息设置 SerializationInfo 对象。Sets the SerializationInfo object with the class name, the member name, the signature of the missing member, and additional exception information.

public:
 override void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
public override void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Security.SecurityCritical]
public override void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
Public Overrides Sub GetObjectData (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

包含序列化对象数据的对象。The object that holds the serialized object data.

context
StreamingContext

有关源或目标的上下文信息。The contextual information about the source or destination.

实现

属性

异常

info 对象是 nullThe info object is null.

注解

GetObjectData 会设置 SerializationInfo,对所有异常对象数据进行序列化。GetObjectData sets a SerializationInfo with all the exception object data targeted for serialization. 在反序列化期间,将从通过流传输 SerializationInfo 重建异常对象。During deserialization, the exception object is reconstituted from the SerializationInfo transmitted over the stream.

有关详细信息,请参阅 SerializationInfoFor more information, see SerializationInfo.

适用于

另请参阅