In my C# application, I want to get my MAC address by using NetworkInterface
class as the following:
NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces()
{
mac = nic.GetPhysicalAddress()
}
But this code returns the MAC without ':' or any other separator.
How can I retrieve the MAC in this format:
88:88:88:88:87:88
using the code above ONLY?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…