Created
May 9, 2021 15:55
-
-
Save ozansulukpinar/80ef6eab22f389d0e65008afa1089a51 to your computer and use it in GitHub Desktop.
Ping an IP address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Net.NetworkInformation; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Ping ping = new Ping(); | |
PingReply reply = ping.Send(IPAddress,1000); | |
string status = reply.Status.ToString(); | |
Console.WriteLine(status); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment