共用方式為


ConfigurationException.GetObjectData 方法

定義

警告

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

以發生這個組態例外狀況的檔案名稱和行號,設定 SerializationInfo 物件。

public:
 override void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
public override 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 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
[<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}")>]
override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
Public Overrides Sub GetObjectData (info As SerializationInfo, context As StreamingContext)

參數

info
SerializationInfo

存放要序列化之資訊的物件。

context
StreamingContext

關於來源或目的端的內容資訊。

屬性

備註

方法 GetObjectData 會設定 SerializationInfo 物件,其中包含發生這個 ConfigurationException 例外狀況的檔名和行號。 在還原串行化期間,例外 ConfigurationException 狀況會從 SerializationInfo 透過數據流傳輸的對象進行重新建構。

適用於