PrintDocument for WinForms | ComponentOne
C1.PrintDocument.4.8 Assembly / C1.C1Preview Namespace / Utils Class / ConvertUnits Method
The value to convert.
The source unit of measurement.
The target unit of measurement.
The source DPI (used if from is UnitTypeEnum.Pixel).
The target DPI (used if to is UnitTypeEnum.Pixel).

In This Topic
    ConvertUnits Method (Utils)
    In This Topic
    Converts a value from one unit of measurement to another.
    Syntax
    'Declaration
     
    Public Shared Function ConvertUnits( _
       ByVal value As Double, _
       ByVal from As UnitTypeEnum, _
       ByVal to As UnitTypeEnum, _
       ByVal fromDpi As Single, _
       ByVal toDpi As Single _
    ) As Double
    public static double ConvertUnits( 
       double value,
       UnitTypeEnum from,
       UnitTypeEnum to,
       float fromDpi,
       float toDpi
    )

    Parameters

    value
    The value to convert.
    from
    The source unit of measurement.
    to
    The target unit of measurement.
    fromDpi
    The source DPI (used if from is UnitTypeEnum.Pixel).
    toDpi
    The target DPI (used if to is UnitTypeEnum.Pixel).

    Return Value

    value converted to to units.
    See Also