title: How to get/set the IP of a hosted network
body: <p>I created a virtual WiFi hotspot by the following code, I now need to get its IP address but I actually don't know its network interface's name (as no constant name, 'Local Connection *16' maybe).</p>
  
  <p>The goal is to know its IP address so setting the hosted network's IP shall be one of solutions...but it is preferred that no manual works are involved.</p>
  
  <p>This problem really stuck me......Please help ;( </p>
  
  <pre><code>private void Hotspot(string ssid, string key,bool status)
  {
      ProcessStartInfo processStartInfo = new ProcessStartInfo("cmd.exe");
      processStartInfo.RedirectStandardInput = true;
      processStartInfo.RedirectStandardOutput = true;
      processStartInfo.CreateNoWindow = true;
      processStartInfo.UseShellExecute = false;
      Process process = Process.Start(processStartInfo);
  
      if (process != null)
      {
          if (status)
          {
              process.StandardInput.WriteLine ("");
              process.StandardInput.WriteLine("netsh wlan set hostednetwork mode=allow ssid=" + ssid + " key=" + key);
              print ("cmd: "+"netsh wlan set hostednetwork mode=allow ssid=" + ssid + " key=" + key);
              process.StandardInput.WriteLine("netsh wlan start hostednetwork");
              print ("cmd: " + "netsh wlan start hostednetwork");
              process.StandardInput.Close();
          }
          else
          {
              process.StandardInput.WriteLine ("");
              process.StandardInput.WriteLine("netsh wlan stop hostednetwork");
              print ("cmd: " + "netsh wlan stop hostednetwork");
              process.StandardInput.Close();
          }
      }
  }
  </code></pre>