public static bool WithinLatitudeAndLongitude(double dLatitude, double dLongitude, double dLatitude2, double dLongitude2, double dRatioInMiles) { if (Geography.CalcDistance(dLatitude, dLongitude, dLatitude2, dLongitude2) <= dRatioInMiles) return true; return false; }