title: using c# get MAC address of devices connected to my hotspot
body: <p>This code gives MAC address of my PC but I want to find the MAC addresses of those mobile or computer devices who are connected to my wifi hotspot.</p>
  
  <pre><code>string mac = "";
  foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
  {
  
      if (nic.OperationalStatus == OperationalStatus.Up &amp;&amp;
         (!nic.Description.Contains("Virtual") &amp;&amp; !nic.Description.Contains("Pseudo")))
      {
          if (nic.GetPhysicalAddress().ToString() != "")
          {
              mac = nic.GetPhysicalAddress().ToString();
          }
      }
  }
  MessageBox.Show(mac);
  </code></pre>
  
  <p>I want to do something similar, like perhaps the following pseudo-code:</p>
  
  <pre><code>string MAC;
  //method for retrieving mac address of the connected devices to my hotspot. 
  
  ConnectedDevices() 
  {
      // some code which will give you MAC of that device.
      MAC = mac address of connected device;
  }
  label1.text=mac.toString();
  </code></pre>
  
  <p>Thanks!</p>