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 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also