验证中...
Languages: C#
Categories: Web开发技术
Latest update 2019-07-04 22:47
gistfile1.txt
Raw Copy
///<summary>
/// 通过NetworkInterface读取网卡Mac
///</summary>
///<returns></returns>
public static string GetMacByNetworkInterface()
{
List<string> macs = new List<string>();
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
return interfaces.Where(p => p.OperationalStatus == OperationalStatus.Up).FirstOrDefault().GetPhysicalAddress().ToString();
}

Comment list( 0 )

You need to Sign in for post a comment

Help Search

183227_9af5e6a8_1826025 111910_4d91f001_1826025