ArgumentOutOfRangeException.GetObjectData(SerializationInfo, StreamingContext) 方法

定义

设置带有无效参数值和附加异常信息的 SerializationInfo 对象。Sets the SerializationInfo object with the invalid argument value 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

用于描述序列化数据的源或目标的对象。An object that describes the source or destination of the serialized data.

实现

属性

异常

info 对象是 nullThe info object is null.

注解

GetObjectData 使用针对序列化的所有异常对象数据设置 SerializationInfo 对象。GetObjectData sets a SerializationInfo object 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.

适用于

另请参阅