Dimensionful |
public struct DimensionfulQuantity : IComparable, IComparable<DimensionfulQuantity>, IEquatable<DimensionfulQuantity>, IFormattable
The DimensionfulQuantity type exposes the following members.
| Name | Description | |
|---|---|---|
| DimensionfulQuantity(Double) | Creates a dimensionless quantity with the provided value. | |
| DimensionfulQuantity(Double, IPrefixedUnit) | Creates a quantity with the provided value in the given prefixed unit. | |
| DimensionfulQuantity(Double, IUnit) | Creates a quantity with the provided value in the given unit. | |
| DimensionfulQuantity(Double, SIPrefix, IUnit) | Creates a quantity with the provided value in the given prefixed unit. |
| Name | Description | |
|---|---|---|
| AsQuantityInSIUnits | Gets this quantity in SI units (without prefix). | |
| AsValueInSIUnits | Converts this quantity to its numerical value in SI units (without prefix). | |
| Empty | Gets an empty, i.e. uninitialized, quantity. | |
| HasBiasedUnit | Gets a value indicating whether this instance has a biased unit (i.e. a unit implementing IBiasedUnit. | |
| IsEmpty | Gets a value indicating whether this instance is empty. It is empty if no unit has been associated so far with this instance. | |
| Prefix | Gets the SI prefix of this quantity. | |
| PrefixedUnit | Gets the prefixed unit of this quantity. | |
| TreatedAsUnbiasedDifference | Gets the quantity as treated as unbiased difference value. If the unit of this quantity is not biased, the return value is exactly this quantity. But if the unit is biased, the return value is the difference of this quantity and the same quantity with zero value. Example: 20 °C will transform to 20 K, because 20°C - 0 °C = 20 K. | |
| Unit | Gets the unit of this quantity. | |
| Value | Gets the numeric value of this quantity in the context of prefix and unit. |
| Name | Description | |
|---|---|---|
| Abs | Get the absolute value of this quantity. | |
| Abs(DimensionfulQuantity) | ||
| AsQuantityIn(IPrefixedUnit) | Converts this quantity to another quantity in the provided prefixed unit. | |
| AsQuantityIn(IUnit) | Converts this quantity to another quantity in the provided unit (without prefix). | |
| AsQuantityIn(SIPrefix, IUnit) | Converts this quantity to another quantity in the provided unit, with the provided prefix. | |
| AsValueIn(IPrefixedUnit) | Converts this quantity to its numerical value in the given unit, with the given prefix. | |
| AsValueIn(IUnit) | Converts this quantity to its numerical value in the given unit (without prefix). | |
| AsValueIn(SIPrefix, IUnit) | Converts this quantity to its numerical value in the given unit, with the given prefix. | |
| CompareTo(DimensionfulQuantity) | Compares this quanitity to another quantity. | |
| CompareTo(Object) | Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. | |
| Equals(DimensionfulQuantity) | Indicates whether the current object is equal to another object of the same type. | |
| Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object)) | |
| GetHashCode | Returns the hash code for this instance. (Overrides ValueTypeGetHashCode) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| IsEqualInValuePrefixUnit | Determines whether this instance is equal to another quanity in all three components (value, prefix and unit). This is not a comparison for the physical equality of the quantities. | |
| Max | ||
| Min | ||
| RoundUpOrDown | ||
| ToString | Returns the fully qualified type name of this instance. (Overrides ValueTypeToString) | |
| ToString(String, IFormatProvider) | Formats the value of the current instance using the specified format. | |
| WithNewValue | Creates an instance with a new value, and with the same prefix and unit as this quantity. |
| Name | Description | |
|---|---|---|
| CheckUnitCompatibleWith |
Checks whether the quantity x has the expected expectedUnit, and if not, throws an ArgumentException.
(Defined by DimensionfulQuantityExtensions) |