using System; using System.Collections.Generic; using System.Linq; using System.Net.NetworkInformation; using System.Text; using System.Threading.Tasks; namespace JWH { public static class ExtensionNetwork { /// /// Get PhysicalAddress (MAC Address) /// /// public static string GetPhysicalAddress() { List list = new List(); foreach(NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()) { if (nic.OperationalStatus == OperationalStatus.Up) list.Add(nic); } return list[0].GetPhysicalAddress().ToString(); } } }