Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int decimals = -1; // ...или >= 100.
- string format = "{0:F" + decimals + "}";
- Console.WriteLine(format, 12311);
- decimals = -1; // ...или >= 100.
- format = "{0:P" + decimals + "}";
- Console.WriteLine(format, 12311);
- // Тук не знам какви са невалидните стойности, предполагам че са свързани с буфера на конзолата.
- // Валидно число от тип int, при което се хвърля изключение.
- int totalWidth = -10000000;
- format = "{0," + totalWidth + "}";
- Console.WriteLine(format, 12311);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement