✅ "{0:C}" doesn't return the '$' symbol as it used to.
This used to return the '$' symbol, but now it doesn't. I'm using the latest version with C# in a .Net 8.0 project. Any reason for that?
Example:
12 Replies
it returns whatever is your window currency symbol setup to
if u want to change that u need to change the culture of the console
for example:
I never had to use this in the past. I wonder if it's just required now to set the culture info.
I got an exeception when trying that:
like I said its your window configuration
you can look it up
that is what determinates what symbol your console will display
I opened up the .csproj and changed InvariantGlobalization from true to false, and it worked fine.
I'm guessing it's a .Net thing compared to the .Net framework.
it doesnt have a InvariantGlobalization in the csproj by default
so u must have added it there
I did change the project's properties prior to programming in it. It's maybe a setting I changed accidently.
$close
If you have no further questions, please use /close to mark the forum thread as answered
normally the ruling is the OS currency
unless u have something extra changing it
glad u figured it out
Thanks.