Skip to content

IEnumerable.OrderBy should detect TKey parameters that are not IComparable. #704

Description

@TonyValenti

Hi All!
It would be really great if the signature for Linq's Enumerable.OrderBy was updated such that TKey had to implement IComparable. The same is true regarding ThenBy. This would make it possible to catch certain errors at compile time rather than run time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-suggestionEarly API idea and discussion, it is NOT ready for implementationarea-System.Linqcode-analyzerMarks an issue that suggests a Roslyn analyzer

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions