Skip to main content
Namespace: VM
Assembly: VM.dll
This class is to represent the Unit.

Inheritance

object ← Unit

Extension Methods

LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType), LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType), LinkPropertyItemCache.GetLinkedObjects<T>(object, LinkPropertyType)

Constructors

Unit()

Initializes a new instance of the Unit class

Unit(Unit)

Initializes a new instance of the Unit class

Parameters

unitValue Unit The unit

Unit(UnitType)

Initializes a new instance of the Unit class

Parameters

type UnitType The type of unit

Unit(SerializationInfo, StreamingContext)

Initializes a new instance of the Unit class

Parameters

information SerializationInfo The info. context StreamingContext The context

Properties

Angle

Gets or sets the angle.

Property Value

string

Force

Gets or sets the force.

Property Value

string

Handle

Gets the handle.

Property Value

IntPtr

Length

Gets or sets the length.

Property Value

string

Mass

Gets or sets the mass.

Property Value

string

Power

Gets or sets the power

Property Value

string

Temperature

Gets or sets the temperature

Property Value

string

Time

Gets or sets the time.

Property Value

string

Work

Gets or sets the work

Property Value

string

this[string]

Gets or sets the unit by indexer.

Property Value

string

Methods

ConvertTo(Unit, string)

Convert to.

Parameters

referenceUnit Unit The reference unit stringType string The type

Returns

double The convert data

Dispose()

Equals(object)

Parameters

obj object

Returns

bool

GetFactor(string)

Get factor for unit type

Parameters

type string The unit type

Returns

double The factor

GetHashCode()

Returns

int

Initialize(string)

Initializes a instance.

Parameters

stringUnitPath string The path of unit.

IsContain(string)

Contains unit.

Parameters

stringType string The type of unit.

Returns

bool true if contains unit type, otherwise false.

Operators

operator ==(Unit, Unit)

Compare two units

Parameters

left Unit The unit right Unit The unit to compare

Returns

bool true if two units are equal, otherwise false.

operator !=(Unit, Unit)

Compare two units

Parameters

left Unit The unit right Unit The unit to compare

Returns

bool true if two units are not equal, otherwise false.