title: Index (zero based) must be greater than or... Working with the Bit.ly API
body: <p>I'm working (actually more like playing) around with the Bit.ly API, and keep getting the error in the title of this question. So I'm going to show you the code and hopefuly someone can help me resolve this. First the client side code.</p>
  
  <pre><code>var x = service.GetClicks(url, service.BitlyLogin, service.BitlyAPIKey);
  Console.WriteLine(x);
  
  Console.ReadLine();
  </code></pre>
  
  <p>And this is the code that's being called</p>
  
  <pre><code>public List&lt;int&gt; GetClicks(string url, string login, string key)
  {
      List&lt;int&gt; clicks = new List&lt;int&gt;();
      url = Uri.EscapeUriString(url);
      string reqUri =
          String.Format("http://api.bit.ly/v3/clicks?" +
          "login={0}&amp;apiKey={1}&amp;shortUrl={2}&amp;format=xml" +
          login, key, url);
  
      HttpWebRequest req = (HttpWebRequest)WebRequest.Create(reqUri);
      req.Timeout = 10000; // 10 seconds
  
      Stream stm = req.GetResponse().GetResponseStream();
  
  
      XmlDocument doc = new XmlDocument();
      doc.Load(stm);
  
      // error checking for xml
      if (doc["response"]["status_code"].InnerText != "200")
          throw new WebException(doc["response"]["status_txt"].InnerText);
  
      XmlElement el = doc["response"]["data"]["clicks"];
      clicks.Add(int.Parse(el["global_clicks"].InnerText));
      clicks.Add(int.Parse(el["user_clicks"].InnerText));
  
      return clicks;
  }
  </code></pre>
  
  <p>As you can see it's very simple code, nothing complicated, and I can see nothing that causes this error. Anyone out there who has worked with(the full error is Index (zero based) must be greater than or equal to zero and less than the size of the argument list.) the Bit.ly API and can lend a hand?</p>