NetworkAddressChangedEventHandler 委托

定义

引用在网络接口地址更改时要调用的一个或多个方法。References one or more methods to be called when the address of a network interface changes.

public delegate void NetworkAddressChangedEventHandler(System::Object ^ sender, EventArgs ^ e);
public delegate void NetworkAddressChangedEventHandler(object sender, EventArgs e);
type NetworkAddressChangedEventHandler = delegate of obj * EventArgs -> unit
Public Delegate Sub NetworkAddressChangedEventHandler(sender As Object, e As EventArgs)

参数

sender
Object

事件源。The source of the event.

e
EventArgs

包含事件数据的 EventArgs 对象。An EventArgs object that contains data about the event.

继承
NetworkAddressChangedEventHandler

示例

下面的代码示例侦听地址更改,并在发生 NetworkAddressChanged 事件时显示网络接口的状态。The following code example listens for address changes and displays the status of network interfaces when a NetworkAddressChanged event occurs.

注解

此委托处理 NetworkChange 类引发 NetworkAddressChanged 事件。This delegate handles NetworkAddressChanged events raised by the NetworkChange class. 有关接收网络接口地址更改事件通知的详细信息,请参阅 NetworkChange 类概述文档。For detailed information on receiving notification for network interface address change events, see the NetworkChange class overview documentation.

Windows 2000 和更高版本支持 NetworkAddressChanged 事件。The NetworkAddressChanged event is supported on Windows 2000 and later.

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于