ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / AreaUnit Class / ConvertTo(Double,AreaUnit) Method
Area in the units of this instance.
Unit to convert to.
Example

In This Topic
    ConvertTo(Double,AreaUnit) Method
    In This Topic
    Converts the area to the provided area unit.
    Syntax
    public double ConvertTo( 
       double inArea,
       AreaUnit outUnit
    )
    Public Function ConvertTo( _
       ByVal inArea As Double, _
       ByVal outUnit As AreaUnit _
    ) As Double

    Parameters

    inArea
    Area in the units of this instance.
    outUnit
    Unit to convert to.

    Return Value

    Area converted to the specifed unit.
    Exceptions
    ExceptionDescription
    The outUnit is null.
    Example
    AreaUnit - Convert between hectares and acres
    // convert 2 hectares to acres
    double acres = AreaUnit.Hectares.ConvertTo(2, AreaUnit.Acres);
    
    AreaUnit - Convert between hectares and square miles
    // convert 300 hectares to square miles
    double sqMiles = AreaUnit.Hectares.ConvertTo(300, AreaUnit.SquareMiles);
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also