ArgumentException.GetObjectData(SerializationInfo, StreamingContext) ArgumentException.GetObjectData(SerializationInfo, StreamingContext) ArgumentException.GetObjectData(SerializationInfo, StreamingContext) ArgumentException.GetObjectData(SerializationInfo, StreamingContext) Method

定义

设置带有参数名和附加异常信息的 SerializationInfo 对象。Sets the SerializationInfo object with the parameter name and additional exception information.

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 SerializationInfo SerializationInfo SerializationInfo

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

context
StreamingContext StreamingContext StreamingContext StreamingContext

关于来源和目标的上下文信息The contextual information about the source or destination.

实现

异常

info 对象是空引用(在 Visual Basic 中为 Nothing)。The info object is a null reference (Nothing in Visual Basic).

注解

GetObjectData 使用针对于序列化的所有异常对象数据设置 SerializationInfoGetObjectData 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.

安全性

SecurityPermission
用于提供序列化服务。for providing serialization services. 关联的枚举: SerializationFormatter 安全操作: LinkDemandAssociated enumeration: SerializationFormatter Security action: LinkDemand

SecurityCriticalAttribute
直接调用方需要完全信任。requires full trust for the immediate caller. 不能由部分受信任的或透明的代码使用此成员。This member cannot be used by partially trusted or transparent code.

适用于

另请参阅