|
| PhysicalValue (double value, MeasuredQuantity measuredQuantity) |
| Default constructor.
|
|
| PhysicalValue (double value, MeasuredQuantity measuredQuantity, string comment) |
| Constructor with a comment string.
|
|
| PhysicalValue (double value, PhysicalProperty physicalProperty) |
| Default constructor.
|
|
| PhysicalValue (double value, PhysicalProperty physicalProperty, string comment) |
| Constructor with a comment string.
|
|
| PhysicalValue (PhysicalValue physicalValue) |
| Copy constructor.
|
|
| PhysicalValue (SerializationInfo info, StreamingContext context) |
| Deserialization constructor. See the ISerializable interface for more details.
|
|
override string | ToString () |
| Overridden ToString function. The PhysicalValue is formatted like "1 nm".
|
|
override string | ToString (int significantDigits) |
| Overridden ToString function. The PhysicalValue is formatted like "1 nm".
|
|
override string | ToString (string format, IFormatProvider formatProvider=null) |
| Overridden ToString function provided by the IFormattable interface. Returns a System.String that represents this instance.
|
|
override object | Clone () |
|
override bool | Equals (object otherObject, EqualityIntent equalityIntent) |
| Determines whether the specified Object is equal to this instance.
|
|
Complex | GetComplexValue () |
| Gets the actual value as a complex number.
|
|
| PhysicalValueBase (MeasuredQuantity measuredQuantity, string comment) |
| Standard constructor.
|
|
| PhysicalValueBase (PhysicalProperty physicalProperty) |
| Standard constructor.
|
|
| PhysicalValueBase (PhysicalProperty physicalProperty, string comment) |
| Standard constructor.
|
|
| PhysicalValueBase (PhysicalValueBase physicalValueBase) |
| Copy constructor.
|
|
| PhysicalValueBase (SerializationInfo info, StreamingContext context) |
| Deserialization constructor. See the ISerializable interface for more details.
|
|
string | ToString (int significantDigits) |
| Returns a System.String that represents this instance.
|
|
string | ToString (string format, IFormatProvider formatProvider=null) |
| ToString function provided by the IFormattable interface. Returns a System.String that represents this instance.
|
|
|
static bool | operator!= (PhysicalValue value1, PhysicalValue value2) |
| Compares two PhysicalValue for inequality. The comparison will be done by comparing the values, units, and comments, respectively.
|
|
static bool | operator== (PhysicalValue value1, PhysicalValue value2) |
| Compares two PhysicalValue for equality. The comparison will be done by comparing the values, units, and comments, respectively.
|
|
static string | GetFormatString (bool showPhysicalUnits, int numberOfDigits, ComplexToStringConversionFormat? complexNumberFormat=null) |
| Gets the format string which can be used for the ToString method.
|
|
class for a double value with a physical unit.
override string ToString |
( |
string |
format, |
|
|
IFormatProvider |
formatProvider = null |
|
) |
| |
Overridden ToString function provided by the IFormattable interface. Returns a System.String that represents this instance.
- Parameters
-
format | The format. "U" or an empty string means that the string is formatted with units (e.g. "1 nm"). "G" means that the string is formatted without units (e.g. "1e-9"). "F" means that the string is formatted as "{Comment} of {Value with units}" (e.g. "wavelength of 300 nm"). |
In all cases you can add a number to specify the number of digits that shall be used. E.g. "U3" results in "1.23 nm", while "U4" results in "1.234 nm". You can add further formatting commands after a comma, but these are ignored. This behavior ensures that the same formatting strings can be used for both PhysicalValue and PhysicalValueComplex.
For any other string the ToString(format, formatProvider) of the Value is used.
- Parameters
-
formatProvider | Optional culture specific format provider used for formatting the value (if format is not "U" or "F"). |
- Returns
- A System.String that represents this instance.