title: Connect to a wireless network in C#
body: <p>I'm using the Managed WiFi API and the example code:</p>
  
  <pre><code>string profileName = "Cheesecake"; // this is also the SSID
  string mac = "52544131303235572D454137443638";
  string key = "hello";
  string profileXml = string.Format("&lt;?xml version=\"1.0\"?&gt;&lt;WLANProfile xmlns=\"http://www.microsoft.com/networking/WLAN/profile/v1\"&gt;&lt;name&gt;{0}&lt;/name&gt;&lt;SSIDConfig&gt;&lt;SSID&gt;&lt;hex&gt;{1}&lt;/hex&gt;&lt;name&gt;{0}&lt;/name&gt;&lt;/SSID&gt;&lt;/SSIDConfig&gt;&lt;connectionType&gt;ESS&lt;/connectionType&gt;&lt;MSM&gt;&lt;security&gt;&lt;authEncryption&gt;&lt;authentication&gt;open&lt;/authentication&gt;&lt;encryption&gt;WEP&lt;/encryption&gt;&lt;useOneX&gt;false&lt;/useOneX&gt;&lt;/authEncryption&gt;&lt;sharedKey&gt;&lt;keyType&gt;networkKey&lt;/keyType&gt;&lt;protected&gt;false&lt;/protected&gt;&lt;keyMaterial&gt;{2}&lt;/keyMaterial&gt;&lt;/sharedKey&gt;&lt;keyIndex&gt;0&lt;/keyIndex&gt;&lt;/security&gt;&lt;/MSM&gt;&lt;/WLANProfile&gt;", profileName, mac, key);
  wlanIface.SetProfile( Wlan.WlanProfileFlags.AllUser, profileXml, true );
  wlanIface.Connect( Wlan.WlanConnectionMode.Profile, Wlan.Dot11BssType.Any, profileName );
  </code></pre>
  
  <p>I updated the code to use my SSID and key, but I don't know how should I get the MAC address.</p>