SIPrefixList Type

Represents a list of known SIPrefixes.

Constructors

Constructor Description

SIPrefixList(from)

Full Usage: SIPrefixList(from)

Parameters:
    from : IEnumerable<SIPrefix> - An enumeration of prefixes that should be the content of this list.

Initializes a new instance of the SIPrefixList class.

from : IEnumerable<SIPrefix>

An enumeration of prefixes that should be the content of this list.

ArgumentNullException from

Instance members

Instance member Description

this.ContainsNonePrefixOnly

Full Usage: this.ContainsNonePrefixOnly

Returns: bool
Modifiers: abstract

Return true if the collection contains exactly one element, which is the prefix SIPrefix.None.

Returns: bool

this.Count

Full Usage: this.Count

Returns: int
Modifiers: abstract

Gets the number of prefixes in this list.

Returns: int

this.GetEnumerator

Full Usage: this.GetEnumerator

Returns: IEnumerator<SIPrefix> An enumerator that iterates through all known prefixes.
Modifiers: abstract

Returns an enumerator that iterates through all known prefixes.

Returns: IEnumerator<SIPrefix>

An enumerator that iterates through all known prefixes.

this.GetPrefixFromExponent

Full Usage: this.GetPrefixFromExponent

Parameters:
    exponent : int - The exponent.

Returns: SIPrefix * float The prefix, and a remaining factor. If the exponent is greater than or equal to the exponent of the smallest Prefix (SIPrefix.SmallestPrefix), the remaining factor is greater then or equal to 1.

Gets the prefix from the given exponent. Example: given an exponent of 9, this call will return the SIPrefix.Giga with a remaining factor of 1.

exponent : int

The exponent.

Returns: SIPrefix * float

The prefix, and a remaining factor. If the exponent is greater than or equal to the exponent of the smallest Prefix (SIPrefix.SmallestPrefix), the remaining factor is greater then or equal to 1.

this.TryGetPrefixFromShortCut

Full Usage: this.TryGetPrefixFromShortCut

Parameters:
    shortCut : string - The short cut.

Returns: SIPrefix The prefix with the given shortcut. If no such prefix exist, the function will return null.
Modifiers: abstract

Try the get a prefix, given its shortcut. Example: given the string 'n', this function will return the prefix SIPrefix.Nano.

shortCut : string

The short cut.

Returns: SIPrefix

The prefix with the given shortcut. If no such prefix exist, the function will return null.

ArgumentNullException shortCut