IPercentageFormat Interface

Provides access to members that format percentages.

Description

The members in the **IPercentageFormat**interface define how the ValueToStringmethod in the associated INumberFormat****interface formats numbers.

The PercentageFormatcoclass also inherits the INumericFormat****interface, so both these interface's properties determine how numbers are formatted.

When To Use

Use the IPercentageFormatinterface to format numbers that represent percentages.

Members

Name Description
Read/write property AdjustPercentage Indicates if ValueToString agument is treated as a fraction or a percentage.

IPercentageFormat.AdjustPercentage Property

Indicates if ValueToString agument is treated as a fraction or a percentage.

Public Property AdjustPercentage As Boolean
public bool AdjustPercentage {get; set;}

Description

The AdjustPercentage property allows the conversion to and from fractions and sets or returns an indicator that tells how the**ValueToString method's argument is treated in the associated INumberFormat**interface.

The settings for AdjustPercentage are:

Setting Description
**False** (Default) The arguments to the ValueToStringand StrinToValuemethods are assumed to be in percentage format already. For ValueToString, a percentage symbol (%) is appended to the value, and for StringToValue, this is removed.
True The argument to the ValueToStringmethod is treated as a fraction. The value is multiplied by 100 and a percent symbol (%) is appended. For StringToValue, the output is converted to a fraction (from a percentage)�it is divided by 100, and any percentage symbol is removed.

Classes that implement IPercentageFormat

Classes Description
PercentageFormat An object for formatting numbers in a percentage format.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.