共用方式為


GetObjectData 方法

將知識物件資料序列化為 SerializationInfo 物件。

命名空間:  Microsoft.Synchronization
組件:  Microsoft.Synchronization (在 Microsoft.Synchronization.dll 中)

語法

'宣告
<SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter := True)> _
Public Overridable Sub GetObjectData ( _
    info As SerializationInfo, _
    context As StreamingContext _
)
'用途
Dim instance As SyncKnowledge
Dim info As SerializationInfo
Dim context As StreamingContext

instance.GetObjectData(info, context)
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
public virtual void GetObjectData(
    SerializationInfo info,
    StreamingContext context
)
[SecurityPermissionAttribute(SecurityAction::Demand, SerializationFormatter = true)]
public:
virtual void GetObjectData(
    SerializationInfo^ info, 
    StreamingContext context
)
[<SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)>]
abstract GetObjectData : 
        info:SerializationInfo * 
        context:StreamingContext -> unit 
[<SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)>]
override GetObjectData : 
        info:SerializationInfo * 
        context:StreamingContext -> unit 
public function GetObjectData(
    info : SerializationInfo, 
    context : StreamingContext
)

參數

實作

ISerializable. . :: . .GetObjectData(SerializationInfo, StreamingContext)

例外

例外狀況 條件
InvalidOperationException

這個 SyncKnowledge 物件尚未初始化。

ArgumentNullException

info 是 null Nothing nullptr unit null 參考 (在 Visual Basic 中為 Nothing) 。

請參閱

參考

SyncKnowledge類別

SyncKnowledge 成員

Microsoft.Synchronization 命名空間