I looked at some of the dotnet source and I found this.
CultureInfo.DefaultThreadCurrentCulture = ci;
It looks like you can set the culture of the current thread by default from the static property CultureInfo , and not from Thread.CurrentThread
missed you a little more, I found this
public CultureInfo CurrentCulture { get { Contract.Ensures(Contract.Result<CultureInfo>() != null); return CultureInfo.CurrentCulture; } set { Contract.EndContractBlock();
This is the value of Thread.cs . Thus, you can explicitly set the CultureInfo.CurrentCulture property.
Example:
CultureInfo.CurrentCulture = new CultureInfo("en-GB"); ; Assert.Equal("Β£1,000.00", String.Format("{0:C}", 1000)); CultureInfo.CurrentCulture = new CultureInfo("en-US"); ; Assert.Equal("$1,000.00", String.Format("{0:C}", 1000));

Csproj file for unit test project:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp1.0</TargetFramework> <IsPackable>false</IsPackable> <ApplicationIcon /> <OutputType>Library</OutputType> <StartupObject /> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170425-07" /> <PackageReference Include="xunit" Version="2.2.0" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" /> </ItemGroup> </Project>
source share