dotnet / dotnet/dotnet-api-docs

DefaultCurrentThreadCulture Remark is Ambiguous

Open
#8,767 5 comments 0 reactions 0 assignees View on GitHub
area-System.Globalization Pri3
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.