c# test network connection code example Example: check if network is available c# System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()