Bewerken

Delen via


DictionaryBase.OnRemoveComplete(Object, Object) Method

Definition

Performs additional custom processes after removing an element from the DictionaryBase instance.

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

Parameters

key
Object

The key of the element to remove.

value
Object

The value of the element to remove.

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 removed.

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 removing the element from the underlying Hashtable. By defining this method, implementers can add functionality to inherited methods without having to override all other methods.

OnRemove(Object, Object) is invoked before the standard Remove behavior, whereas OnRemoveComplete(Object, Object) is invoked after the standard Remove behavior.

Applies to

See also