How do I ping an ip address?

  • Thread starter Thread starter DanielGifford
  • Start date Start date
D

DanielGifford

This code works in the normal .net framework, what do I need to do to
get it to run in the compact .net framework?

//begin code

Ping ping = new Ping();
PingReply pingReply = null;
string addressToPing = textBoxServerIP.Text;
addTextToTextBox("Pinging: " + addressToPing);
pingReply = ping.Send(addressToPing);
string pingStatus = pingReply.Status.ToString() + ",
Response Time: " + pingReply.RoundtripTime.ToString() + " ms";
addTextToTextBox(pingStatus);

//end code
 
Back
Top