Tried to format USD as "$500" and SEK as "500kr", but I realized not even Airbnb could do it properly, so I might do this later... Let me know if you've struggled with this, I have questions! ππ
That is a bit of work for sureβ¦ I'll postpone it a bit and then find a way to convert USD to en-US etc. later on! Thanks again for the help π
I would probably rely on something prebuilt, aint got time to reinvent the wheel ;) That said, my guess is you will actually need the locale in en-US/en_US format to use the built in methods
Interesting! I use PHP, I heard there is a function very similar to it. Would you say it's more convenient doing it manually, or rely on things like CultureInfo? βΊοΈ I only store 3-letter currency names, like USD, SEK, GBP etc. Thanks π
decimal dec = 123.00M; string uk = dec.ToString("C", new CultureInfo("en-GB"));
Please sign in to leave a comment.