Windows phone 获取网络连接情况
public static string GetNetStates() { var info = Microsoft.Phone.Net.NetworkInformation.NetworkInterface.NetworkInterfaceType; switch (info) { case NetworkInterfaceType.MobileBroadbandCdma: return "CDMA"; case NetworkInterfaceType.MobileBroadbandGsm: return "CSM"; case NetworkInterfaceType.Wireless80211: return "WiFi"; case NetworkInterfaceType.Ethernet: return "Ethernet"; case NetworkInterfaceType.None: return "None"; default: return "Other"; } }