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

定义

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

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

context
StreamingContext StreamingContext StreamingContext StreamingContext

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

实现

异常

注解

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.

适用于

另请参阅