Click or drag to resize

Format Properties

The Format type exposes the following members.

Properties
 NameDescription
Public propertyDecimals Gets or sets the number of decimal places to include in the formatted output.
Public propertyForceDecimal 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.
Public propertyForceSign 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.
Public propertyOffset Gets or sets the offset value added to the number prior to formatting for output.
Public propertyPrefix Gets or sets the prefix text string prepended to the formatted output value.
Public propertyScale Gets or sets the scale factor multiplied by the value prior to formatting for output.
Public propertySeparator Gets or sets the decimal separator character used in the formatted output. The default separator is '.'. Common alternatives include ',' for European locales.
Public propertySuffix Gets or sets the suffix text string appended to the formatted output value.
Public propertyTrim 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.
Public propertyTrimLeadZero 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".
Public propertyWidth Gets or sets the minimum width of the output string in characters.
Public propertyZeropad 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.
Top
See Also