Silverlight 4 / C #: I have a label showing a number formatted in the currency (with 2 decimal places) of the stream culture, e.g.
25 shows that $ 25.00 and 25.01 show as $ 25.01
For this, I use "StringFormat = C2". My problem is that ... I want to show only 2 decimal places, if there are decimal places. eg.
25 should show that January 25th and 25th should be displayed as $ 25.01
With a normal number, I would use # - for example. #. ## and what suppresses decimal places if they do not exist, but then I won’t get the currency symbol. C2. ## does not work.
Any suggestions please? (Hard currency symbol is not an option)
source
share