runtime: IComparer and IComparer documentation should note ordering properties required

The documentation for IComparer (@docs.microsoft.com, @msdn) and IComparer<T> (@docs.microsoft.com, @msdn) do not note whether any particular ordering properties are expected of a valid implementation, but at least List<T>.Sort assumes some (antisymmetry, per this Connect feedback circa .NET 4.5).

The interface documentation should note what sort of ordering properties the rest of the standard library will be assuming/demanding of a Compare implementation. I’d expect this to be the usual properties of a total order.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (19 by maintainers)

Most upvoted comments

Also fixed the copy-pasting in the example dates, as I had Montreal and Bangalore in time zones over a week apart 😁