DictionaryBase.OnSetComplete(Object, Object, Object) Method

Definition

Performs additional custom processes after setting a value in the DictionaryBase instance.

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

Parameters

key
Object

The key of the element to locate.

oldValue
Object

The old value of the element associated with key.

newValue
Object

The new value of the element associated with key.

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

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

OnSet(Object, Object, Object) is invoked before the standard Set behavior, whereas OnSetComplete(Object, Object, Object) is invoked after the standard Set behavior.

Applies to

See also