How to set a certain number of characters when displaying a number? Not Math.Around (), there the amount is straight with the help of zeros. Thank you in advance!
|
1 answer
Obviously you mean this:
Console.WriteLine("{0:0.000}", Math.PI); Detailed documentation on MSDN begins here, further on the links inside:
Composite Formatting
specifically your case here:
Custom number format strings
|