Returns the plural name of the Unit in a format suitable for display in a user interface,
in a simplified or more detailed form.
Namespace:
ESRI.ArcGISExplorer.GeometryAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public string GetPluralName( UnitNameOptions nameOptions ) |
Visual Basic (Declaration) |
---|
Public Function GetPluralName ( _ nameOptions As UnitNameOptions _ ) As String |
Parameters
- nameOptions
- Type: ESRI.ArcGISExplorer.Geometry..::.UnitNameOptions
Indicates the form of name to return, for example a simplified form of the Unit name.
Return Value
A string containing the pluralized name of the Unit.Remarks
You can use this method to return the pluralized name of a unit 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 plural name would be 'Miles'. Alternatively to return a UI-friendly singular name, use GetDisplayName(UnitNameOptions).
Note that for some units, the simple and detailed names are the same, for example Kilometers and Meters.
Examples
The code below uses the Unit property of a CoordinateSystem and the GetPluralName method of Unit to
build a string reporting the specific units used by the coordinate system.
CopyC#
// Find out the Units used in a CoordinateSystem. CoordinateSystem bng = CoordinateSystem.ProjectedCoordinateSystems.NationalGrids.Europe.BritishNationalGrid; string message = "The coordinate system " + bng.Name + " uses the units " + bng.Unit.GetPluralName(UnitNameOptions.Detailed);
CopyVB.NET
' Find out the Units used in a CoordinateSystem. Dim bng As CoordinateSystem = CoordinateSystem.ProjectedCoordinateSystems.NationalGrids.Europe.BritishNationalGrid Dim message As String = "The coordinate system " & bng.Name & _ " uses the units " & bng.Unit.GetPluralName(UnitNameOptions.Detailed)