Possible Duplicate:
Reliable method to get machine's MAC address in C#
I want to obtain the mac address of the system through code in the application program so i can use it to authorize at the system level ?
Possible Duplicate:
Reliable method to get machine's MAC address in C#
I want to obtain the mac address of the system through code in the application program so i can use it to authorize at the system level ?
You can get it via the active network interface, such as:
var mac =
(from item in NetworkInterface.GetAllInterfaces()
where item.OperationalStatus == OperationalStatus.Up
select item.GetPhysicalAddress()).FirstOrDefault();
Failing retrieval from an active interface, you might consider just grabbing the loopback address. Also, you could loop the elements as opposed to using Linq, should you wish to.