using System; using System.Collections.Generic; using System.Net.NetworkInformation; using System.Runtime.InteropServices; using System.Text; using System.Management; namespace Share { /// <summary> /// 判断网络类 /// </summary> public class Intern…
using System.Net.NetworkInformation; bool isLocalAreaConnected = NetworkInterface.GetIsNetworkAvailable(); if (isLocalAreaConnected) { Common.MessageBox.ShowMes(this,"有链接"); } using System.IO; using System.Runtime.InteropServices;//引入这两个命名空间,不用引…