DbConnection.OnStateChange(StateChangeEventArgs) Método

Definición

Genera el evento StateChange.Raises the StateChange event.

protected:
 virtual void OnStateChange(System::Data::StateChangeEventArgs ^ stateChange);
protected virtual void OnStateChange (System.Data.StateChangeEventArgs stateChange);
abstract member OnStateChange : System.Data.StateChangeEventArgs -> unit
override this.OnStateChange : System.Data.StateChangeEventArgs -> unit
Protected Overridable Sub OnStateChange (stateChange As StateChangeEventArgs)

Parámetros

stateChange
StateChangeEventArgs

Objeto StateChangeEventArgs que contiene los datos del evento.A StateChangeEventArgs that contains the event data.

Comentarios

Cuando se genera un evento, se invoca el controlador de eventos a través de un delegado.Raising an event invokes the event handler through a delegate. Para obtener información general, consulte controlar y provocar eventos.For an overview, see Handling and Raising Events.

Notas a los desarrolladores de herederos

Al reemplazar OnStateChange(StateChangeEventArgs) en una clase derivada, asegúrese de llamar al método de la clase base OnStateChange(StateChangeEventArgs) .When overriding OnStateChange(StateChangeEventArgs) in a derived class, be sure to call the base class's OnStateChange(StateChangeEventArgs) method.

Se aplica a