Class PrefixMultiple
Represents the base class from which all implementations of unit prefix that can can be expressed as a either a multiple or a submultiple of the unit of measurement should derive. Implements the IPrefixMultiple
Implements
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public abstract class PrefixMultiple : IPrefixMultiple
Constructors
| Improve this Doc View SourcePrefixMultiple(String, String, Double, Double)
Initializes a new instance of the PrefixMultiple struct.
Declaration
protected PrefixMultiple(string name, string symbol, double value, double exponent)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the binary unit. |
String | symbol | The symbol of the the unit prefix. |
Double | value | The number to be raised to a power. |
Double | exponent | The number that specifies a power. |
Fields
| Improve this Doc View SourceNone
Defines a prefix multiple of none (0).
Declaration
public static readonly IPrefixMultiple None
Field Value
Type | Description |
---|---|
IPrefixMultiple |
Properties
| Improve this Doc View SourceMultiplier
Gets the unit prefix multiplier.
Declaration
public double Multiplier { get; }
Property Value
Type | Description |
---|---|
Double | The unit prefix multiplier. |
Name
Gets the name of the unit prefix.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String | The name of the unit prefix. |
Symbol
Gets the symbol of the unit prefix.
Declaration
public string Symbol { get; }
Property Value
Type | Description |
---|---|
String | The symbol of the unit prefix. |
Methods
| Improve this Doc View SourceToBaseValue(Double)
Converts the unit prefixValue
back to a unit base value.
Declaration
public double ToBaseValue(double prefixValue)
Parameters
Type | Name | Description |
---|---|---|
Double | prefixValue | The value of the unit prefix. |
Returns
Type | Description |
---|---|
Double | A Double that represents a unit base value. |
ToPrefixValue(Double)
Converts the unit base value
to a unit prefix value.
Declaration
public double ToPrefixValue(double value)
Parameters
Type | Name | Description |
---|---|---|
Double | value | The value of the base unit. |
Returns
Type | Description |
---|---|
Double | A Double that represents a unit prefix value. |
ToString()
Returns a String that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A String that represents this instance. |