UtilValueToString Method
Converts a double value to a string with an appropriate number of digits.
Optionally uses scientific notation for large numbers (|value| > 999), and for small numbers
that would require more than maxNumberOfDecimals decimals to display two significant digits.
Namespace: DHI.Mike1D.GenericAssembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 25.0.0.0 (11.1.1.1111)
public static string ValueToString(
double value,
bool useScientificNotationForLargeNumbers = true,
bool useScientificNotationForSmallNumbers = true,
int maxNumberOfDecimals = 10,
int minNumberOfDecimals = 2
)
- value Double
- The numeric value to convert to string.
- useScientificNotationForLargeNumbers Boolean (Optional)
- If true, use scientific notation for large numbers; otherwise, use standard numeric format.
- useScientificNotationForSmallNumbers Boolean (Optional)
-
If true, small numbers that would require more than maxNumberOfDecimals decimals are shown in scientific notation; otherwise, they are shown as "0.000".
- maxNumberOfDecimals Int32 (Optional)
- Maximum number of decimals to use in the output string. Default is 10.
- minNumberOfDecimals Int32 (Optional)
- Minimum number of decimals to use in the output string. Default is 2.
String[Missing <returns> documentation for "M:DHI.Mike1D.Generic.Util.ValueToString(System.Double,System.Boolean,System.Boolean,System.Int32,System.Int32)"]