title: How to calculate distance between lat/long in c#
body: <p>In a c# winform application I've a latitude/longitude List. I can to calculate in sql server (2005) query but I dont know if I can do this in c#.</p>
  
  <pre><code>SELECT LAT, LONG, ( 3959 * acos( cos( radians(37) ) * cos( radians( LAT ) ) * cos( radians( LONG ) - radians(-122) ) + sin( radians(37) ) * sin( radians( LAT ) ) ) ) AS distance
  FROM Table ORDER BY distance
  </code></pre>
  
  <p>Using This query in sql server I can order a list of latitude and longitude. 
  But, in c# I've lat/long in this list:</p>
  
  <pre><code>var latLon = new List&lt;LatLonClass&gt;();
  </code></pre>
  
  <p>Using this list, How can I do same query in my List?
  Thanks!</p>