Ping Конструктор

Определение

Инициализирует новый экземпляр класса Ping.Initializes a new instance of the Ping class.

public:
 Ping();
public Ping ();
Public Sub New ()

Примеры

В следующем примере кода показано создание Ping экземпляра.The following code example demonstrates creating a Ping instance. Полный пример доступен в разделе Общие сведения о классе Ping.The complete example is available in the Ping class overview.

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);

Применяется к