Below you will find a simple example that illustrates the issue.
The below code prints 21.000 in net5.0
If I replace the TargetFramework with netcoreapp3.1 it returns 21.00
I'm running 16.8 VS community.
<ProjectSdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<!--<TargetFramework>netcoreapp3.1</TargetFramework>-->
</PropertyGroup>
</Project>
usingSystem;usingSystem.Globalization;namespaceConsoleApp12{classProgram{staticvoidMain(string[]args){CultureInfo.CurrentCulture=newCultureInfo("en-US");Console.WriteLine(21.ToString("n"));}}}
Let me know if you need any more info or I'm doing something wrong.
Below you will find a simple example that illustrates the issue.
The below code prints
21.000innet5.0If I replace the TargetFramework with
netcoreapp3.1it returns21.00I'm running 16.8 VS community.
Let me know if you need any more info or I'm doing something wrong.