Skip to content

DefaultCurrentThreadCulture Remark is Ambiguous #8767

Open
@nagilson

Description

@nagilson

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions