ArgumentException.GetObjectData(SerializationInfo, StreamingContext) 方法

定義

設定具有參數名稱和額外例外狀況資訊的 SerializationInfo 物件。Sets the SerializationInfo object with the parameter name and additional exception information.

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.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

保存序列化物件資料的物件。The object that holds the serialized object data.

context
StreamingContext

有關來源或目的地的內容資訊。The contextual information about the source or destination.

實作

屬性

例外狀況

info 物件為 Null 參考 (在 Visual Basic 中為 Nothing)。The info object is a null reference (Nothing in Visual Basic).

備註

GetObjectData 會以目標為序列化的所有例外狀況物件資料設定 SerializationInfoGetObjectData sets a SerializationInfo 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.

適用於

另請參閱