1

I can't find a way to customize the format, example 555.555 to $ 555.55 K or 4201337 to $ 4.20 M.

I've used CultureInfo but I can't find the solution.

On the Microsoft website I haven't found the solution: https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings

What could be the most correct solution to this problem? Thanks!

Soncan
  • 83
  • 1
  • 1
  • 5
  • take a look at this https://stackoverflow.com/questions/14488796/does-net-provide-an-easy-way-convert-bytes-to-kb-mb-gb-etc which is similar or https://stackoverflow.com/questions/11731996/string-format-numbers-thousands-123k-millions-123m-billions-123b i think.... – TheGeneral Apr 11 '19 at 01:15
  • also why is 555.555 to $ 555.55 K ? – TheGeneral Apr 11 '19 at 01:19
  • Context matters. How do you need to use it? Where will this formatting be needed? Can you show us the code where this would be used? –  Apr 11 '19 at 01:20
  • 1
    Sorry! This question https://stackoverflow.com/questions/11731996/string-format-numbers-thousands-123k-millions-123m-billions-123b has solved my problem.I'm developing a mobile video game and I wanted to format the player's fictitious money so that it would be correctly displayed on screen. – Soncan Apr 11 '19 at 01:35

0 Answers0