So I am curious if its possible for me to use the .ToString("C") method to generate a currency value off of my number, but have it display the value combined with a minimum value.
An example, lets say that my number would never ever go above $1,000.00. However, the values that are usually generated are below like this, $0,487.00. I know your probably thinking why would you want to do that. In this situation I don’t want the label size to increase or decrease based on the content. Also, I want the numbers to be substituted with 0’s if they are not filled in by the actual dollar amount. Any suggestions?
You can just use a custom format string:
Note that by using
0s instead of#s in your format string, it guarantees that those digits will be present, even if the number’s not big enough.