dotnet / dotnet/dotnet-api-docs
DefaultCurrentThreadCulture Remark is Ambiguous
- Lingua principale
- C#
- Stelle
- 950
- Fork
- 1.7k
- Merge medio
- 2g 19h
- PR unite (30g)
- 52
Descrizione
On this page, https://learn.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo.defaultthreadcurrentculture?redirectedfrom=MSDN&view=net-7.0#remarks, there is a remark which states the following:
`If you have not explicitly set the culture of any existing threads executing in an application domain, setting the [DefaultThreadCurrentCulture](https://learn.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo.defaultthreadcurrentculture?view=net-7.0) property also changes the culture of these threads. However, if these threads execute in another application domain, their culture is defined by the [DefaultThreadCurrentCulture](https://learn.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo.defaultthreadcurrentculture?view=net-7.0) property in that application domain or, if no default value is defined, by the default system culture.`
I think the typo(s) make this a bit unclear, is it:
If
1. These threads execute in another application domain
2. Their culture is defined by the [DefaultThreadCurrentCulture] property
3. No default value is defined by the default system culture
Then
DefaultThreadCurrentCulture won't take effect, so you need to set CurrentUICulture? I think it could be made a bit more clear how 2 and 3 are different, as well as how is it possible that the DefaultThreadCurrentCulture culture doesn't work if it is defined by DefaultThreadCurrentCulture?
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Leggere la pagina API collegata di CultureInfo.DefaultThreadCurrentCulture e la relativa sezione Remarks, quindi confrontare la documentazione collegata di DefaultThreadCurrentCulture. Chiarire la distinzione tra una cultura del thread impostata esplicitamente, una cultura predefinita del dominio applicativo e la cultura di sistema. Il lavoro è completato quando la nota spiega senza ambiguità quale cultura si applica in ciascun caso.
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