This project is read-only.

Connection Status

Sep 9, 2013 at 2:16 AM
What is the best way to get connect or disconnected status ?
Sep 14, 2013 at 4:18 PM
If you're talking about a RAS connection, you can simply call the RasConnection.GetActiveConnections() method and see if the connection you're interested in is present in the result. If you're talking about whether the machine is connected to the Internet, it can't.
RasConnection conn = RasConnection.GetActiveConnections().Where(o => o.EntryName = "Your Entry").SingleOrDefault();
if (conn != null)
    // The connection is currently active.
I hope that answers your question!