Created
February 26, 2012 05:17
-
-
Save crosbymichael/1913344 to your computer and use it in GitHub Desktop.
Get mac address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string macAddress = (from iface in NetworkInterface.GetAllNetworkInterfaces() | |
where iface.OperationalStatus == OperationalStatus.Up | |
select iface).FirstOrDefault().GetPhysicalAddress().ToString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment