Given modern C# supporting indices, ranges, etc; it would make sense for path to implement ReadOnlyList. GetStepWithStart is a very rare exception to the rule and that function could remain as is, however I propose the following API:
class Path : IReadOnlyList<Point>
{
public Point this[int index] => /* Index of point not including start */
public int Count => /* Length not including start */
// GetStepWithStart could remain, so could Length. GetStep itself could be removed or marked as deprecated.
}
Given modern C# supporting indices, ranges, etc; it would make sense for path to implement
ReadOnlyList.GetStepWithStartis a very rare exception to the rule and that function could remain as is, however I propose the following API: