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);
[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.

安全性

SecurityPermission
提供序列化服務。for providing serialization services. 相關聯的列舉: SerializationFormatter安全性動作:LinkDemandAssociated enumeration: SerializationFormatter Security action: LinkDemand

SecurityCriticalAttribute
需要完全信任立即呼叫者。requires full trust for the immediate caller. 部分信任或透明的程式碼無法使用這個成員。This member cannot be used by partially trusted or transparent code.

適用於

另請參閱