Skip to content

Not an issue but a suggestion #2

Description

@TyJOrtiz

Hi,

I ran across your repo and it's been helpful with a project I'm working on. I noticed in your readme that one of the limitations is that it only works in ascending order.

I played around with it and my suggestion is to maybe find a way to set whether the Collection is in Ascending or Descending order

var match = SortDirection == SortDirection.Ascending ? this.Select((group, index) => new { group, index }).FirstOrDefault(i => i.group.Key.CompareTo(key) >= 0) : this.Select((group, index) => new { group, index }).FirstOrDefault(i => i.group.Key.CompareTo(key) <= 0);

i.group.Key.CompareTo(key) >= 0 for Ascending and i.group.Key.CompareTo(key) <= 0 for Descending.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions