DataTable.GetObjectData(SerializationInfo, StreamingContext) 方法

定义

使用序列化 DataTable 时所需的数据填充序列化信息对象。Populates a serialization information object with the data needed to serialize the DataTable.

public:
 virtual void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
public virtual 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 Overridable Sub GetObjectData (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

一个 SerializationInfo 对象,包含与 DataTable 关联的序列化数据。A SerializationInfo object that holds the serialized data associated with the DataTable.

context
StreamingContext

一个 StreamingContext 对象,包含与 DataTable 关联的序列化流的源和目标。A StreamingContext object that contains the source and destination of the serialized stream associated with the DataTable.

实现

异常

info 参数为 null 引用(在 Visual Basic 中为 Nothing)。The info parameter is a null reference (Nothing in Visual Basic).

适用于

另请参阅