title: Parse and read response from Bing Maps REST service
body: <p>Using Bing Maps Rest Service to find the longitude/latitude for an address. I'm getting the response back fine, but I'm having trouble with the correct syntax to reference the long/lat fields (see screen shot from debugger). I've tried </p>
  
  <pre><code>latitude = x.ResourceSets[0].Resources[0].GeocodePoints[0].Coordinates[0];
  
  longitude = x.ResourceSets[0].Resources[0].GeocodePoints[0].Coordinates[1];
  </code></pre>
  
  <p>but they don't compile. </p>
  
  <p>Here is the rest service call ... (not in screen shot).</p>
  
  <pre><code>      private void GetResponse(Uri uri, Action&lt;Response&gt; callback)
    {
       System.Net.WebClient wc = new WebClient();
       wc.OpenReadCompleted += (o, a) =&gt;
       {
          if (callback != null)
          {
             DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(Response));
             callback(ser.ReadObject(a.Result) as Response);
          }
       };
       wc.OpenReadAsync(uri);
    }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Qd6HA.png" rel="nofollow noreferrer">Studio Debugging Screen Shot</a></p>