This document is archived and information here might be outdated.  Recommended version.


IUnitConverter.EsriUnitsAsString Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (System)  

IUnitConverter.EsriUnitsAsString Method

Convert Esri unit enumerations to strings.

[Visual Basic .NET]
Public Function EsriUnitsAsString ( _
    ByVal units As esriUnits, _
    ByVal appearance As esriCaseAppearance, _
    ByVal bPlural As Boolean _
) As String
[C#]
public string EsriUnitsAsString (
    esriUnits units,
    esriCaseAppearance appearance,
    bool bPlural
);
[C++]
HRESULT EsriUnitsAsString(
  esriUnits units,
  esriCaseAppearance appearance,
  VARIANT_BOOL bPlural,
  BSTR* sUnitString
);
[C++]

Parameters units [in]
units is a parameter of type esriUnits appearance [in]
appearance is a parameter of type esriCaseAppearance bPlural [in] bPlural is a parameter of type VARIANT_BOOL sUnitString [out, retval] sUnitString is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Converts the specified units to a string. Specify the case (eg. lower or upper case) of the string and whether the string specifies a single unit or many unit(s).

The EsriUnitsAsString method is useful for providing text to the user interface.

See Also

IUnitConverter Interface