Reports for WinForms | ComponentOne
C1.C1Report.4 Assembly / C1.C1Preview Namespace / Unit Structure / ConvertUnit Method / ConvertUnit(UnitTypeEnum,Single) Method
The target UnitTypeEnum.
The target resolution (used if destUnitType is UnitTypeEnum.Pixel).

In This Topic
    ConvertUnit(UnitTypeEnum,Single) Method
    In This Topic
    Attempts to convert the current unit value to other unit of measurement.

    Only absolute units can be converted. This method throws an exception if the conversion cannot be performed.

    Syntax
    'Declaration
     
    Public Overloads Function ConvertUnit( _
       ByVal destUnitType As UnitTypeEnum, _
       ByVal destDpi As Single _
    ) As Double
    public double ConvertUnit( 
       UnitTypeEnum destUnitType,
       float destDpi
    )

    Parameters

    destUnitType
    The target UnitTypeEnum.
    destDpi
    The target resolution (used if destUnitType is UnitTypeEnum.Pixel).

    Return Value

    The value in destUnitType units.
    See Also