ערוך

שתף באמצעות


BindingsCollection.OnCollectionChanging(CollectionChangeEventArgs) Method

Definition

Raises the CollectionChanging event.

protected:
 virtual void OnCollectionChanging(System::ComponentModel::CollectionChangeEventArgs ^ e);
protected virtual void OnCollectionChanging (System.ComponentModel.CollectionChangeEventArgs e);
abstract member OnCollectionChanging : System.ComponentModel.CollectionChangeEventArgs -> unit
override this.OnCollectionChanging : System.ComponentModel.CollectionChangeEventArgs -> unit
Protected Overridable Sub OnCollectionChanging (e As CollectionChangeEventArgs)

Parameters

Remarks

The CollectionChanging event occurs when the event is about to change.

Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

The OnCollectionChanging method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

When overriding OnCollectionChanging(CollectionChangeEventArgs) in a derived class, be sure to call the base class's OnCollectionChanging(CollectionChangeEventArgs) method so that registered delegates receive the event.

Applies to