title: Error Message : Index was outside the bounds of the array
body: <p>I'm aware of what the issue is stating but I am confused to how my program is making this error.</p>
  
  <p>I have two arrays of strings in a dll file:</p>
  
  <pre><code>string[] Names = { };
  string[] SignalQuality = { };
  </code></pre>
  
  <p>The code that I set again the <code>strings[]</code> inside the class:</p>
  
  <pre><code>Names[i] = networkName;
  SignalQuality[i] = network.wlanSignalQuality + "%";
  </code></pre>
  
  <p>And when I call them from my program using Tuple:</p>
  
  <pre><code>string[] Names = Network.GetAvailableRouters().Item1;
  string[] Signals = Network.GetAvailableRouters().Item2;
  Console.WriteLine(Names[0] + " " + Signals[0]);
  </code></pre>
  
  <p>Throws me an exception message inside the class:   </p>
  
  <blockquote>
    <p>System.IndexOutOfRangeException: 'Index was outside the bounds of the
    array.'</p>
  </blockquote>
  
  <p>Full Code:</p>
  
  <pre><code>public static Tuple&lt;string[], string[]&gt; GetAvailableRouters()
  {
      //Declare here as I said
      string[] Names = { }; 
      string[] SignalQuality = { };
      WlanClient client = new WlanClient();
  
      foreach (WlanClient.WlanInterface wlaninterface in client.Interfaces)
      {
          Wlan.WlanAvailableNetwork[] networks = wlaninterface.GetAvailableNetworkList(0);
          foreach (Wlan.WlanAvailableNetwork network in networks)
          {
              int i = 0;
              Wlan.Dot11Ssid ssid = network.dot11Ssid;
              string networkName = Encoding.ASCII.GetString(ssid.SSID, 0, (int)ssid.SSIDLength);
              Names[i] = networkName;
              SignalQuality[i] = network.wlanSignalQuality + "%";
              i++;
  
          }
      }
      //return with Tuple.Create()
      return Tuple.Create(Names, SignalQuality);
  }
  </code></pre>