Hello,
In my application a calculation is performed which display the text to the GUI. The application multiplies a user given amount by a defined number (Say 0.85) to create a total (User types in 2, application works out 2 x 0.85).
As the number that is displayed is that of a currency I am trying to correctly format the text to make it readable and correct.
So far I have tried
.ToString("N2");
This has just resulted in two additional zero's being appended to the end of the figure.
The problem can be seen here:
As you can see the correct value is .68 (Or £0.68) and my text is showing £68.00 Taking the "N2" out of the ToString does help but I'm still left with £68.
I know this is not as trivial as it sounds but it's something I've never needed to think about before and it's got me thinking about it for a long while.
Thanks!
Note: The data is stored as a double and was previously a float, the application is flexible to change. The currency icon is also not needed as I am providing that manually, only the formatting is necessary.