title: Getting MAC Address C#
body: <p>I have found this code to get a MAC address, but it returns a long string and doesn't include ':'.</p>
  
  <p>Is it possible to add in the ':' or split up the string and add it it myself?</p>
  
  <p>here is the code:</p>
  
  <pre><code>private object GetMACAddress()
  {
      string macAddresses = "";
  
      foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
      {
          if (nic.OperationalStatus == OperationalStatus.Up)
          {
              macAddresses += nic.GetPhysicalAddress().ToString();
              break;
          }
      }
  
      return macAddresses;
   }
  </code></pre>
  
  <p>It returns the value of 00E0EE00EE00 whereas I want it to display something like 00:E0:EE:00:EE:00.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks.</p>