ArgumentException.GetObjectData(SerializationInfo, StreamingContext) 方法

定义

设置带有参数名和附加异常信息的 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

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

context
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.

适用于

另请参阅