共用方式為


OperatingSystem.GetObjectData(SerializationInfo, StreamingContext) 方法

定義

警告

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

使用將這個執行個體還原序列化所需的資料,填入 SerializationInfo 物件。

public:
 virtual void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
public void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public 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
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
[<System.Security.SecurityCritical>]
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

要使用序列化資訊來填入的物件。

context
StreamingContext

要儲存並擷取序列化資料的位置。 保留供未來使用。

實作

屬性

例外狀況

infonull

備註

參數 context 會保留供日後使用;目前未在 方法中實作 GetObjectData

如需詳細資訊,請參閱 SerializationInfo.AddValue 方法。

適用於