ProtectedformatThe locale settings that determine decimal/thousands separators and other culture-specific formatting.
Contains the error message from the last failed operation. Check this property if DotNetNumberFormatter.trySetFormat or parsing methods return an error.
The (DotNetNumberStyles:var) that control which number formats are allowed during parsing.
ProtectedformatProtectedsetProtectedtrimSets the format string to use for formatting numbers.
The format string is tokenized to confirm validity and to optimize formatting/parsing operations.
A standard format string (e.g., "C", "N2", "E3") or custom format string (e.g., "#,##0.00").
A Result indicating success or containing an error message if the format string is invalid.
ProtectedunstyleStatictry
Base class for formatting and parsing numbers using .NET-compatible format strings.
Supports both standard format strings (C, D, E, F, G, N, P, R, X, B) and custom format strings with fine-grained control over digit placeholders, separators, and sections.
Remarks
This is a base class - use DotNetIntegerFormatter, DotNetFloatFormatter, or DotNetDecimalFormatter for specific number types.
Example