Class Prefix
Represents the base class from which all implementations of unit prefix that can can be expressed as either a multiple or a submultiple should derive.
public abstract class Prefix : IPrefix
- Inheritance
-
Prefix
- Implements
- Derived
- Extension Methods
Constructors
Prefix(string, string, double, double)
Initializes a new instance of the Prefix class.
protected Prefix(string name, string symbol, double @base, double exponent)
Parameters
name
stringThe name of the binary unit.
symbol
stringThe symbol of the unit prefix.
base
doubleThe number to be raised to a power.
exponent
doubleThe number that specifies a power.
Fields
None
Defines a prefix multiple of none (0).
public static readonly IPrefix None
Field Value
Properties
Base
Gets the number to be raised of the unit prefix.
public double Base { get; }
Property Value
- double
The number to be raised of the unit prefix.
Exponent
Gets the exponent of the unit prefix.
public double Exponent { get; }
Property Value
- double
The exponent of the unit prefix.
Multiplier
Gets the unit prefix multiplier.
public double Multiplier { get; }
Property Value
- double
The unit prefix multiplier.
Name
Gets the name of the unit prefix.
public string Name { get; }
Property Value
- string
The name of the unit prefix.
Symbol
Gets the symbol of the unit prefix.
public string Symbol { get; }
Property Value
- string
The symbol of the unit prefix.
Methods
ToBaseValue(double)
Converts the unit prefixValue
back to a unit base value.
public double ToBaseValue(double prefixValue)
Parameters
prefixValue
doubleThe value of the unit prefix.
Returns
ToPrefixValue(double)
Converts the unit base baseValue
to a unit prefix value.
public double ToPrefixValue(double baseValue)
Parameters
baseValue
doubleThe value of the base unit.
Returns
ToString()
Returns a string that represents this instance.
public override string ToString()