Report information from NetworkInterface : NetworkInterface : Network C# Examples


C# Examples » Network » NetworkInterface »

 

Report information from NetworkInterface









    
using  System;
using  System.Net.NetworkInformation;

class  MainClass
{
        static  void  Main()
        {
                if  (!NetworkInterface.GetIsNetworkAvailable())
                      return;

                NetworkInterface[]  interfaces  =  NetworkInterface.GetAllNetworkInterfaces();

                foreach  (NetworkInterface  ni  in  interfaces)
                {
                        Console.WriteLine("        Physical  Address:  {0}",    ni.GetPhysicalAddress().ToString());
                }
        }
}
    
   
  
   



Output

Physical Address: 0014A51190DC
    Physical Address: 00C09FC5BD14
    Physical Address:


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Network
» NetworkInterface