Modifier

DictionaryBase.OnInsertComplete(Object, Object) Method

Definition

Performs additional custom processes after inserting a new element into the DictionaryBase instance.

protected:
 virtual void OnInsertComplete(System::Object ^ key, System::Object ^ value);
protected virtual void OnInsertComplete (object key, object value);
protected virtual void OnInsertComplete (object key, object? value);
abstract member OnInsertComplete : obj * obj -> unit
override this.OnInsertComplete : obj * obj -> unit
Protected Overridable Sub OnInsertComplete (key As Object, value As Object)

Parameters

key
Object

The key of the element to insert.

value
Object

The value of the element to insert.

Remarks

The default implementation of this method is intended to be overridden by a derived class to perform some action after the specified element is inserted.

The On* methods are invoked only on the instance returned by the Dictionary property, but not on the instance returned by the InnerHashtable property.

The default implementation of this method is an O(1) operation.

Notes to Inheritors

This method allows implementers to define processes that must be performed after inserting the element into the underlying Hashtable. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.

OnInsert(Object, Object) is invoked before the standard Insert behavior, whereas OnInsertComplete(Object, Object) is invoked after the standard Insert behavior.

Applies to

See also