共用方式為


Ping 建構函式

定義

初始化 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);

適用於