|
Programming Reference for VirtualLab Fusion
2022.1
|
class for a double value with a physical unit. More...
Public Member Functions | |
| PhysicalValue (double value, PhysicalProperty physicalProperty) | |
| Default constructor More... | |
| PhysicalValue (double value, PhysicalProperty physicalProperty, string comment) | |
| Constructor with a comment string. More... | |
| PhysicalValue (PhysicalValue physicalValue) | |
| Copy constructor More... | |
| PhysicalValue (SerializationInfo info, StreamingContext context) | |
| Deserialization constructor. See the ISerializable interface for more details. More... | |
| override string | ToString () |
| Overridden ToString function. The PhysicalValue is formatted like "1 nm". More... | |
| override string | ToString (int significantDigits) |
| Overridden ToString function. The PhysicalValue is formatted like "1 nm". More... | |
| override string | ToString (string format, IFormatProvider formatProvider=null) |
| Overridden ToString function provided by the IFormattable interface. Returns a System.String that represents this instance. More... | |
Public Member Functions inherited from PhysicalValueBase | |
| override bool | Equals (object otherObject, EqualityIntent equalityIntent) |
| Determines whether the specified Object is equal to this instance. More... | |
| Complex | GetComplexValue () |
| Gets the actual value as a complex number. More... | |
| PhysicalValueBase (PhysicalProperty physicalProperty) | |
| Standard constructor More... | |
| PhysicalValueBase (PhysicalProperty physicalProperty, string comment) | |
| Standard constructor More... | |
| PhysicalValueBase (PhysicalValueBase physicalValueBase) | |
| Copy constructor More... | |
| PhysicalValueBase (SerializationInfo info, StreamingContext context) | |
| Deserialization constructor. See the ISerializable interface for more details. More... | |
| abstract string | ToString (int significantDigits) |
| Returns a System.String that represents this instance. More... | |
| abstract string | ToString (string format, IFormatProvider formatProvider=null) |
| ToString function provided by the IFormattable interface. Returns a System.String that represents this instance. More... | |
Static Public Member Functions | |
| 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. More... | |
| 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. More... | |
Static Public Member Functions inherited from PhysicalValueBase | |
| static string | GetFormatString (bool showPhysicalUnits, int numberOfDigits, ComplexToStringConversionFormat? complexNumberFormat=null) |
| Gets the format string which can be used for the ToString method. More... | |
Properties | |
| virtual double | Value [get, set] |
| The value of the PhysicalValue. | |
Properties inherited from PhysicalValueBase | |
| object | ActualParameterRunResult [get] |
| Gets the actual parameter run result. | |
| string | Comment [get, set] |
| A comment specifying what the PhysicalValue actually is. | |
| virtual PhysicalProperty | PhysicalProperty [get, set] |
| The unit of the PhysicalValue. | |
class for a double value with a physical unit.
| PhysicalValue | ( | double | value, |
| PhysicalProperty | physicalProperty | ||
| ) |
Default constructor
| value | The value of the PhysicalValue. |
| physicalProperty | The unit of the PhysicalValue. |
| PhysicalValue | ( | double | value, |
| PhysicalProperty | physicalProperty, | ||
| string | comment | ||
| ) |
Constructor with a comment string.
| value | The value of the PhysicalValue. |
| physicalProperty | The unit of the PhysicalValue. |
| comment | A comment specifying what the PhysicalValue actually is. |
| PhysicalValue | ( | PhysicalValue | physicalValue | ) |
Copy constructor
| physicalValue | PhysicalValue to copy |
| PhysicalValue | ( | SerializationInfo | info, |
| StreamingContext | context | ||
| ) |
Deserialization constructor. See the ISerializable interface for more details.
| info | SerializationInfo |
| context | StreamingContext |
|
static |
Compares two PhysicalValue for inequality. The comparison will be done by comparing the values, units, and comments, respectively.
| value1 | First PhysicalValue object to compare. |
| value2 | Second PhysicalValue object to compare. |
|
static |
Compares two PhysicalValue for equality. The comparison will be done by comparing the values, units, and comments, respectively.
| value1 | First PhysicalValue object to compare. |
| value2 | Second PhysicalValue object to compare. |
| override string ToString | ( | ) |
Overridden ToString function. The PhysicalValue is formatted like "1 nm".
|
virtual |
Overridden ToString function. The PhysicalValue is formatted like "1 nm".
| significantDigits | The number of significant digits. |
Implements PhysicalValueBase.
|
virtual |
Overridden ToString function provided by the IFormattable interface. Returns a System.String that represents this instance.
| 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.
| formatProvider | Optional culture specific format provider used for formatting the value (if format is not "U" or "F"). |
Implements PhysicalValueBase.