use Ping.Send Method (IPAddress) Method
This method sends to the host that is specified by address a 32 Byte data buffer with the
ICMP echo message. The method waits five seconds for an ICMP echo reply message. If it does not receive a reply in that time, the method returns and the Status property is set to
TimedOut.
Ping.Send Method (String)
public PingReply Send(
string hostNameOrAddress
)
Parameters
hostNameOrAddress
Type: System.String
A String that identifies the computer that is the destination for the ICMP echo message. The value specified for this parameter can be a host name or a string representation of an IP address.