Skip to content
Loading
What is the C# equivalent of this code ?
  • Shweta Lodha
    You can do something like this:
    1. foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())  
    2. {  
    3. if (nic.NetworkInterfaceType == NetworkInterfaceType.Ethernet)  
    4. {  
    5.     nic.GetPhysicalAddress();  
    6. }  
    7. } 
    0