You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This regards the formatting of negative numbers using the CultureInfo.
This is not necessarily a problem, but I have a difference in behaviour while migrating an app from Xamarin to MAUI I would like to understand better. So far my searches has not found an explanation, so apologies in advance if the info is out there and I missed it.
For this test I'm using the same Android emulator (Pixel 5 API 34) with system language set to en-US
Here is a simplified code snippet to illustrate the question:
decimal value = -12.34M;
string s = value.ToString("C", CultureInfo.CurrentCulture);
In Xamarin Forms 5 (and earlier versions we used) the result in s is ($12.34)
In .NET MAUI 8 it is -$12.34
Was this a conscious decision that the latter formatting is preferable for English language app users in the US? I'm not a US resident so not familiar with what a typical US phone user would expect.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
This regards the formatting of negative numbers using the CultureInfo.
This is not necessarily a problem, but I have a difference in behaviour while migrating an app from Xamarin to MAUI I would like to understand better. So far my searches has not found an explanation, so apologies in advance if the info is out there and I missed it.
For this test I'm using the same Android emulator (Pixel 5 API 34) with system language set to en-US
Here is a simplified code snippet to illustrate the question:
In Xamarin Forms 5 (and earlier versions we used) the result in
s
is($12.34)
In .NET MAUI 8 it is
-$12.34
Was this a conscious decision that the latter formatting is preferable for English language app users in the US? I'm not a US resident so not familiar with what a typical US phone user would expect.
Beta Was this translation helpful? Give feedback.
All reactions