Ping 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 Ping 类的新实例。
public:
Ping();
public Ping ();
Public Sub New ()
示例
下面的代码示例演示如何创建 Ping 实例。 类概述中 Ping 提供了完整的示例。
Ping ^ pingSender = gcnew Ping;
// When the PingCompleted event is raised,
// the PingCompletedCallback method is called.
pingSender->PingCompleted += gcnew PingCompletedEventHandler( PingCompletedCallback );
Ping pingSender = new Ping ();
// When the PingCompleted event is raised,
// the PingCompletedCallback method is called.
pingSender.PingCompleted += new PingCompletedEventHandler (PingCompletedCallback);