SoFunction
Updated on 2025-03-07

C# determines whether the IP address can be pinged


Ping pingSender = new Ping();
PingReply reply = ("127.0.0.1",120);//The first parameter is the ip address, and the second parameter is the time of ping
if( == )
{
//Ping
}
else
{
//Ping is not working
}