PrintDocument for WinForms | ComponentOne
C1.PrintDocument.4.8 Assembly / C1.C1Preview Namespace / Unit Structure / ConvertUnit Method / ConvertUnit(Single,UnitTypeEnum,Single) Method
The current unit value's resolution (used if Units is UnitTypeEnum.Pixel).
The target UnitTypeEnum.
The target resolution (used if destUnitType is UnitTypeEnum.Pixel).

In This Topic
    ConvertUnit(Single,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 sourceDpi As Single, _
       ByVal destUnitType As UnitTypeEnum, _
       ByVal destDpi As Single _
    ) As Double
    public double ConvertUnit( 
       float sourceDpi,
       UnitTypeEnum destUnitType,
       float destDpi
    )

    Parameters

    sourceDpi
    The current unit value's resolution (used if Units is UnitTypeEnum.Pixel).
    destUnitType
    The target UnitTypeEnum.
    destDpi
    The target resolution (used if destUnitType is UnitTypeEnum.Pixel).

    Return Value

    The value in destUnitType units.
    See Also