IAngleFormat Interface

Provides access to members that format angles.

Description

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

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

When To Use

Use the IAngleFormatinterface to format numbers that represent angles.

Members

Name Description
Read/write property AngleInDegrees Indicates if the ValueToString argument is in degrees.
Read/write property DisplayDegrees Indicates if the formatted number is an angle in degrees.

IAngleFormat.AngleInDegrees Property

Indicates if the ValueToString argument is in degrees.

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

Description

The AngleInDegreesproperty sets or returns an option that tells the ValueToString method in the associated INumberFormat****interface whether or not the ingoing parameter value is in degrees or radians.

AngleInDegreeshas to do with the ValueToStringargument value. If the value is in degrees, set AngleInDegreesTrue.

The settings for AngleInDegreesare:

Setting Description
False (Default) The ValueToStringargument is assumed to be a _radian_value.
True The ValueToStringargument is assumed to be a degree value.

IAngleFormat.DisplayDegrees Property

Indicates if the formatted number is an angle in degrees.

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

Description

The DisplayDegreesproperty sets or returns an option that tells the ValueToString**method in the associated INumberFormat**interface whether or not the resulting formatted expression is in degrees or radians.

DisplayDegreeshas to do with the ValueToStringresult. If you want the resulting formatted number to be a degree value, set DisplayDegreesTrue. If DisplayDegreesis False, the formatted number is a radian value.

The settings for DisplayDegreesare:

Setting Description
False (Default) The resulting format is a _radian_value. A degree symbol is _not_appended.
True The resulting format is a _degree_value. A degree symbol (�) is appended to the format.

Classes that implement IAngleFormat

Classes Description
AngleFormat An object for formatting numbers in an angle format.

Remarks

If the AngleInDegreesproperty is not set the same as the DisplayDegreesproperty (both of these are Boolean [True/False] properties), a radian-to-degree conversion (or vice versa) will take place when the ValueToString****method formats the value.

AngleInDegreeshas to do with the ValueToStringargument value. If the value is in degrees, set AngleInDegreesTrue. If AngleInDegreesis False, the argument is assumed to be a radian value.

DisplayDegreeshas to do with the ValueToStringresult. If you want the resulting formatted number to be a degree value, set DisplayDegreesTrue. A degree symbol (�) is also appended to the resulting formatted number. If DisplayDegreesis False, the formatted number is a radian value and no degree symbol is appended.

The corresponding StringToValue**method also uses these two properties. To obtain the numerical value that was used as a parameter to the ValueToStringmethod, make sure the AngleInDegreesand DisplayDegreesproperties are set are the same as they were when the ValueToStringmethod was used. These settings may seem like they work in reverse when using the StringToValuemethod, but if you consider that StringToValue**is intended to obtain numerical values from formatted strings, this makes more sense.

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