Thanks to @PMK here is the C# implementation of it. My change is to get x-Number of points between start and end instead of getting all points in x distance
/// Calculates the distance between two lat, long coordinate pairs
/// <param name="lat1"></param>
/// <param name=...