DbConnection.StateChange 事件

定义

当连接状态改变时发生。

public:
 virtual event System::Data::StateChangeEventHandler ^ StateChange;
public virtual event System.Data.StateChangeEventHandler StateChange;
public virtual event System.Data.StateChangeEventHandler? StateChange;
member this.StateChange : System.Data.StateChangeEventHandler 
Public Overridable Custom Event StateChange As StateChangeEventHandler 

事件类型

注解

StateChange 连接状态从“已关闭”更改为“已打开”或从“打开”更改为“已关闭”时,将发生该事件。

适用于

另请参阅