NameObjectCollectionBase.OnDeserialization(Object) NameObjectCollectionBase.OnDeserialization(Object) NameObjectCollectionBase.OnDeserialization(Object) NameObjectCollectionBase.OnDeserialization(Object) Method

定義

實作 ISerializable 介面,並於還原序列化完成時引發還原序列化事件。Implements the ISerializable interface and raises the deserialization event when the deserialization is complete.

public:
 virtual void OnDeserialization(System::Object ^ sender);
public virtual void OnDeserialization (object sender);
abstract member OnDeserialization : obj -> unit
override this.OnDeserialization : obj -> unit
Public Overridable Sub OnDeserialization (sender As Object)

參數

sender
Object Object Object Object

還原序列化之事件的來源。The source of the deserialization event.

實作

例外狀況

與目前 SerializationInfo 執行個體關聯的 NameObjectCollectionBase 物件是無效的。The SerializationInfo object associated with the current NameObjectCollectionBase instance is invalid.

備註

雖然OnDeserialization方法不是預設的情況下,COM 用戶端看見繼承NameObjectCollectionBase類別將它公開,並在 COM 用戶端可能會導致非預期的行為。While the OnDeserialization method is not visible to COM clients by default, inheriting the NameObjectCollectionBase class can expose it and can cause undesirable behavior in COM clients.

這個方法是 O (n) 運算,其中nCountThis method is an O(n) operation, where n is Count.

適用於

另請參閱