C# Ping

In this article I want to show you how to “ping” an IP Address by using C#.

First of all what we should know is what packages are required to accomplish this task, we must use System and System.Net.NetworkInformation packages.

We need an instance an Ping class object to send the ping request through Send() method, then we can manage the ping reply with an object of PingReply class, we can extract useful information from this object (Address, RoundtripTime and Status in this example).

If you have any doubt or want to thank for this article I will gladly read your messages, thank you.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*