dotnet / dotnet/dotnet-api-docs

`StringSort` does not work as described in the docs

Aperta
#9,014 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area-System.Globalization doc-bug Pri3
Lingua principale
C#
Stelle
949
Fork
1.7k
Merge medio
2g 19h
PR unite (30g)
52

Descrizione

.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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with the CompareOptions.StringSort example linked in the issue and compare its documented comment with the reported .NET 5–7 sorting output. Determine whether the example or the behavior is incorrect; done means the API documentation accurately explains StringSort, or the discrepancy is clearly resolved.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.