RuntimeFieldHandle.GetObjectData(SerializationInfo, StreamingContext) 方法

定义

使用反序列化当前实例所表示的字段所需的数据填充 SerializationInfoPopulates a SerializationInfo with the data necessary to deserialize the field represented by the current instance.

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

参数

info
SerializationInfo

要用序列化信息填充的 SerializationInfo 对象。The SerializationInfo object to populate with serialization information.

context
StreamingContext

(保留)存储和检索序列化数据的地方。(Reserved) The place to store and retrieve serialized data.

实现

属性

异常

infonullinfo is null.

当前实例的 Value 属性不是有效句柄。The Value property of the current instance is not a valid handle.

注解

参数context是保留的; 它当前不参与此操作。The context parameter is reserved; it does not currently participate in this operation.

有关更多信息,请参见 SerializationInfo.AddValue 方法。For more information, see the SerializationInfo.AddValue method.

安全性

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

适用于