Converts a value from one unit to another.
Syntax
Parameters
- value
- Value to be converted. This is in srcUnit units.
- srcUnit
- Source AnnUnit unit.
- destUnit
- Destination AnnUnit unit.
Return Value
The converted value.
Example
This example converts a value of 200 pixels to inches at 96 DPI.
Visual Basic | Copy Code |
---|
Public Sub AnnUnitConverter_Convert()
Dim result As Single = AnnUnitConverter.Convert(200.0F, AnnUnit.Pixel, AnnUnit.Inch)
End Sub |
C# | Copy Code |
---|
public void AnnUnitConverter_Convert() { float result = AnnUnitConverter.Convert(200.0F, AnnUnit.Pixel, AnnUnit.Inch); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also