Format Properties |
The Format type exposes the following members.
| Name | Description | |
|---|---|---|
| Decimals | Gets or sets the number of decimal places to include in the formatted output. | |
| ForceDecimal | Gets or sets a value indicating whether the decimal point always appears in the output. When true, the decimal point is always included; when false, the decimal point is omitted for integer values. | |
| ForceSign | Gets or sets a value indicating whether a plus (+) sign is forced on positive numbers. When true, positive numbers include an explicit plus sign; when false, only negative numbers show a sign. | |
| Offset | Gets or sets the offset value added to the number prior to formatting for output. | |
| Prefix | Gets or sets the prefix text string prepended to the formatted output value. | |
| Scale | Gets or sets the scale factor multiplied by the value prior to formatting for output. | |
| Separator | Gets or sets the decimal separator character used in the formatted output. The default separator is '.'. Common alternatives include ',' for European locales. | |
| Suffix | Gets or sets the suffix text string appended to the formatted output value. | |
| Trim | Gets or sets a value indicating whether trailing zeros are removed from the decimal portion. When true, trailing zeros to the right of the decimal point are trimmed from the output. | |
| TrimLeadZero | Gets or sets a value indicating whether the leading zero before the decimal point is removed. When true, fractional numbers appear as ".123" instead of "0.123". | |
| Width | Gets or sets the minimum width of the output string in characters. | |
| Zeropad | Gets or sets a value indicating whether leading zeros are added to fill the output width. When true, the output is padded with zeros at the beginning to match the specified width. |