FileSystemInfo.GetObjectData(SerializationInfo, StreamingContext) 方法

定義

以檔案名稱和其他例外狀況資訊設定 SerializationInfo 物件。Sets the SerializationInfo object with the file name and additional exception information.

public:
 virtual void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Runtime.InteropServices.ComVisible(false)]
[System.Security.SecurityCritical]
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,包含所擲回之例外狀況的相關序列化物件資料。The SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

包含有關來源或目的端內容資訊的 StreamingContextThe StreamingContext that contains contextual information about the source or destination.

實作

屬性

備註

如需一般 i/o 工作的清單, 請參閱一般 i/o工作。For a list of common I/O tasks, see Common I/O Tasks.

安全性

FileIOPermission
許可權, 可存取目前實例所描述之路徑的相關資訊。for permission to access information about the path described by the current instance. 相關聯的列舉:FileIOPermissionAccessAssociated enumeration: FileIOPermissionAccess 安全性動作:需Security action: Demand

SecurityPermission
以取得連結至此類別的許可權。for permission to link to this class. 相關聯的列舉:SerializationFormatterAssociated enumeration: SerializationFormatter 安全性動作:連結需求Security action: Link Demand

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

適用於

另請參閱