Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

StringSort does not work as described in the docs  #9014

Copy link
Copy link
Open
@ilonatommy

Description

@ilonatommy
Issue body actions

.NET 7, Console App, but actually it happens for net6, net 5, net core 3.1 as well. The last dotnet that works as the docs is framework 4.7.2, so it looks like it's by design.

This is what docs claim to happen (see the comment in the end of the example):
https://learn.microsoft.com/en-us/dotnet/api/system.globalization.compareoptions?view=net-7.0#examples

While this is what is happening:

Initially,
cant
bill's
coop
cannot
billet
can't
con
bills
co-op

After sorting without CompareOptions.StringSort:
bill's
billet
bills
can't
cannot
cant
co-op
con
coop

After sorting with CompareOptions.StringSort:
bill's
billet
bills
can't
cannot
cant
co-op
con
coop

Most probably there was copy-paste error. In case it is not by design, we need to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.Globalizationdoc-bugProblem with the content; needs to be fixedProblem with the content; needs to be fixed

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.