Number.ToPrecision Method
| Explanation | Returns the value stored in the Number object as a string in exponential or fixed-point notation for the specified number of digits. If the argument is omitted, the result equivalent to the ToString method is returned. | |
| Call format | var text = num.ToPrecision( [ fractionDigits ] ) | |
| Return value | String in exponential or fixed-point notation. Returns the one with the shorter expression. | |
| Arguments | integer fractionDigits | Number of digits. Specify 1 to 15. |
| Exception | Func-4 | The argument value is invalid |
| Example of use | | |
| Related item | ToExponential, ToFixed, ToString method | |