using System.Net.NetworkInformation; public Boolean ping(String serverAddr) { try { Ping p = new Ping(); PingReply reply = p.Send(serverAddr); p.Dispose(); if (reply.Status == IPStatus.Success) { return true; } } catch(Exception ex) { trace(ex.Message); } return false; }