If you just want to check if the network is up then use:
bool networkUp
= System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();
To check a specific interface's status (or other info) use:
NetworkInterface[] networkCards
= System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces();
To check the status of a remote computer then you'll have to connect to that computer (see other answers)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…