title: Google search API with C#
body: <p>I'm  trying to use a google search api using this code : </p>
  
  <pre><code>// perform search
  WebQuery retreiver = new WebQuery(query);
  retreiver.StartIndex.Value = 1;
  retreiver.HostLangauge.Value = Languages.English;
  IGoogleResultSet&lt;GoogleWebResult&gt; rawresults = GoogleService.Instance.Search&lt;GoogleWebResult&gt;(retreiver);
  //declare results list
  List&lt;string&gt; resultslist = new List&lt;string&gt;();
  //add results to list
  foreach (GoogleWebResult result in rawresults.Results)
  {
      resultslist.Add(result.Content);
  }
  </code></pre>
  
  <p>with this api - <a href="https://googledotnet.codeplex.com" rel="nofollow noreferrer">Search AP</a></p>
  
  <p>but i keep getting a object reference not set to an instance of an object error , could you please explain why and how its erroring?</p>