Show / Hide Table of Contents

Class UnitUtils

Provides some utilities related to Unit of Measurement.

Inheritance
System.Object
UnitUtils
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Neodynamic.Windows.ThermalLabelEditor
Assembly: cs.temp.dll.dll
Syntax
public class UnitUtils

Methods

Convert(FontUnit, Double, FontUnit, Int32)

Converts a font unit value to another font unit.

Declaration
public static double Convert(FontUnit fromUnit, double value, FontUnit toUnit, int numOfFractionalDigits)
Parameters
Type Name Description
FontUnit fromUnit

The font unit to convert from.

System.Double value

The value to convert to the new font unit.

FontUnit toUnit

The new font unit which the specified value and unit will be converted to.

System.Int32 numOfFractionalDigits

The number of fractional digits for the conversion result.

Returns
Type Description
System.Double

Returns the new value after converting the specified value and font unit to the new font unit.

Convert(UnitType, Double, UnitType, Int32)

Converts a unit value to another unit.

Declaration
public static double Convert(UnitType fromUnit, double value, UnitType toUnit, int numOfFractionalDigits)
Parameters
Type Name Description
UnitType fromUnit

The unit to convert from.

System.Double value

The value to convert to the new unit.

UnitType toUnit

The new unit which the specified value and unit will be converted to.

System.Int32 numOfFractionalDigits

The number of fractional digits for the conversion result.

Returns
Type Description
System.Double

Returns the new value after converting the specified value and unit to the new unit.

Back to top Copyright © 2003- Neodynamic SRL
http://www.neodynamic.com