Check if computer is alive with C#

To check if a computer in the network is alive we are going to ping it through C# and Ping class.

Ping ping = new Ping();
PingReply pingReply;
pingReply = ping.Send(ip, timeout);
if (pingReply.Status == IPStatus.Success)
{
	....
}
else
{
	....
}
Categories: C# Tags: , , , , , ,
%d bloggers like this: