SIUnit Type

Represents an SI (Système international) unit.

Constructors

Constructor Description

SIUnit(metre, kilogram, second, ampere, kelvin, mole, candela)

Full Usage: SIUnit(metre, kilogram, second, ampere, kelvin, mole, candela)

Parameters:
    metre : sbyte - Power of 'Metre' units that the constructed unit will contain.
    kilogram : sbyte - Power of 'Kilogram' units that the constructed unit will contain.
    second : sbyte - Power of 'Second' units that the constructed unit will contain.
    ampere : sbyte - Power of 'Ampere' units that the constructed unit will contain.
    kelvin : sbyte - Power of 'Kelvin' units that the constructed unit will contain.
    mole : sbyte - Power of 'Mole' units that the constructed unit will contain.
    candela : sbyte - Power of 'Candela' units that the constructed unit will contain.

Constructor of the SI unit.

metre : sbyte

Power of 'Metre' units that the constructed unit will contain.

kilogram : sbyte

Power of 'Kilogram' units that the constructed unit will contain.

second : sbyte

Power of 'Second' units that the constructed unit will contain.

ampere : sbyte

Power of 'Ampere' units that the constructed unit will contain.

kelvin : sbyte

Power of 'Kelvin' units that the constructed unit will contain.

mole : sbyte

Power of 'Mole' units that the constructed unit will contain.

candela : sbyte

Power of 'Candela' units that the constructed unit will contain.

Instance members

Instance member Description

this.Equals

Full Usage: this.Equals

Parameters:
    other : SIUnit - The other unit.

Returns: bool True when both units are equal.
Modifiers: abstract

Compares this unit with another unit other and returns true when both are equal. Two SI units are considered equal if the exponents are equal, independently of the unit name. This means e.g. that J (Joule), Nm, and Ws are considered equal. If you want to compare the name too, use SIUnit.Equals

other : SIUnit

The other unit.

Returns: bool

True when both units are equal.

this.Equals

Full Usage: this.Equals

Parameters:
    obj : IUnit - The other unit.

Returns: bool True when both units are equal.
Modifiers: abstract

Compares this unit with another unit obj and returns true if both are equal. To be equal, the other unit has to be (i) a SI unit, and (ii) the same name. Thus, J (Joule) and Nm (Newtonmeter) are not considered equal.

obj : IUnit

The other unit.

Returns: bool

True when both units are equal.

this.Equals

Full Usage: this.Equals

Parameters:
    obj : obj - The Object to compare with this instance.

Returns: bool true if the specified Object is equal to this instance; otherwise, false.
Modifiers: abstract

Determines whether the specified Object is equal to this instance.

obj : obj

The Object to compare with this instance.

Returns: bool

true if the specified Object is equal to this instance; otherwise, false.

this.FromSIUnit

Full Usage: this.FromSIUnit

Parameters:
    x : float - Value in SI units.

Returns: float The corresponding value in this unit. Since this instance represents a SI unit, the value x is returned unchanged.
Modifiers: abstract

Converts x (in SI units) to the corresponding value in this unit.

x : float

Value in SI units.

Returns: float

The corresponding value in this unit. Since this instance represents a SI unit, the value x is returned unchanged.

this.GetHashCode

Full Usage: this.GetHashCode

Returns: int A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Modifiers: abstract

Returns a hash code for this instance.

Returns: int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

this.IsCompatibleTo

Full Usage: this.IsCompatibleTo

Parameters:
Returns: bool

attr : UnitDescriptionAttribute
Returns: bool

this.Name

Full Usage: this.Name

Returns: string
Modifiers: abstract

Full name of the unit.

Returns: string

this.Prefixes

Full Usage: this.Prefixes

Returns: ISIPrefixList
Modifiers: abstract

Returns a list of possible prefixes for this unit (like µ, m, k, M, G..).

Returns: ISIPrefixList

this.ShortCut

Full Usage: this.ShortCut

Returns: string
Modifiers: abstract

Usual shortcut of the unit.

Returns: string

this.ToSIUnit

Full Usage: this.ToSIUnit

Parameters:
    x : float - Value to convert.

Returns: float The corresponding value of x in SI units. Since this instance represents a SI unit, the value x is returned unchanged.
Modifiers: abstract

Converts x to the corresponding SI unit.

x : float

Value to convert.

Returns: float

The corresponding value of x in SI units. Since this instance represents a SI unit, the value x is returned unchanged.

Static members

Static member Description

x * y

Full Usage: x * y

Parameters:
Returns: SIUnit

x : SIUnit
y : SIUnit
Returns: SIUnit

x / y

Full Usage: x / y

Parameters:
Returns: SIUnit

x : SIUnit
y : SIUnit
Returns: SIUnit

a <> b

Full Usage: a <> b

Parameters:
Returns: bool

a : SIUnit
b : SIUnit
Returns: bool

a <> b

Full Usage: a <> b

Parameters:
Returns: bool

a : SIUnit
b : IUnit
Returns: bool

a = b

Full Usage: a = b

Parameters:
Returns: bool

a : SIUnit
b : SIUnit
Returns: bool

a = b

Full Usage: a = b

Parameters:
Returns: bool

a : SIUnit
b : IUnit
Returns: bool