NameObjectCollectionBase.OnDeserialization(Object) 方法

定义

实现 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

反序列化事件源。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)操作,其中 nCount的。This method is an O(n) operation, where n is Count.

适用于

另请参阅