Specifies the unit naming style used in the GetPluralName(UnitNameOptions) and GetDisplayName(UnitNameOptions) methods.

Namespace:  ESRI.ArcGISExplorer.Geometry

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public enum UnitNameOptions
Visual Basic (Declaration)
Public Enumeration UnitNameOptions

Members

Member nameDescription
Detailed
Specifies the detailed full name of the Unit, for example 'Survey Mile' or 'Survey Miles' for MilesSurvey.
Simple
Specifies a simplified form of the name of the Unit, for example 'Mile' or 'Miles' for MilesSurvey.

Remarks

You can use this enumeration in the GetPluralName(UnitNameOptions) and GetDisplayName(UnitNameOptions) methods to return unit names suitable for display in a user interface. Using UnitNameOptions.Simple returns the name of the basic unit of measurement, for example for MilesSurvey, the simple name would be 'Mile', and the detailed name would be 'Survey Mile'.

Note that for some units, the simple and detailed names are the same, for example Kilometers and Meters.

Examples

The code below creates new Unit objects representing linear and angular units using a nested type initializer. It builds a string to report the conversion Factor indicating how many Meters (for linear units) and Radians (for angular units) are in the specified units, using the GetDisplayName property to format the name of the Unit.
CopyC#
// Create new Units with a specific unit of measurement.
Unit feet = Unit.Linear.Feet;
Unit degrees = Unit.Angular.Degrees;

// Find out the conversion factors.
double factorFeet = Unit.Convert(1, feet, Unit.Linear.Meters);
string feetInfo = "1 " + feet.GetDisplayName(UnitNameOptions.Detailed) + " = " + factorFeet + " Meters";

double factorDegrees = Unit.Convert(1, degrees, Unit.Angular.Radians);
string degreesInfo = "1 " + degrees.GetDisplayName(UnitNameOptions.Detailed) + " = " + factorDegrees + " Radians";
CopyVB.NET
' Create new Units with a specific unit of measurement.
Dim feet As Unit = Unit.Linear.Feet
Dim degrees As Unit = Unit.Angular.Degrees

' Find out the conversion factors.
Dim factorFeet As Double = Unit.Convert(1, feet, Unit.Linear.Meters)
Dim feetInfo As String = "1 " & feet.GetDisplayName(UnitNameOptions.Detailed) & " = " & factorFeet & " Meters"

Dim factorDegrees As Double = Unit.Convert(1, degrees, Unit.Angular.Radians)
Dim degreesInfo As String = "1 " & degrees.GetDisplayName(UnitNameOptions.Detailed) & " = " & factorDegrees & " Radians"

See Also