Quantity Methods |
The Quantity type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Add |
Returns the sum of the specified quantities. The quantities must have the same Unit.
|
![]() ![]() | AreCompatible |
Returns true if the two quantities are compatible (e.g. have the same unit).
|
![]() ![]() | Compare |
Compares the quantities. The quantities must have the same unit.
|
![]() | 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.
|
![]() | CompareTo(Quantity) |
Compares the current object with another object of the same type.
|
![]() ![]() | Divide |
Divides the specified quantities.
The operation is successful only if both quantities have the same measurement unit.
|
![]() | Equals(Object) |
Determines whether the specified Object, is equal to this instance.
(Overrides ObjectEquals(Object).) |
![]() | Equals(Quantity) |
Indicates whether the current object is equal to another object of the same type.
|
![]() | GetHashCode |
Returns a hash code for this instance.
(Overrides ObjectGetHashCode.) |
![]() ![]() | Multiply |
Multiplies the specified quantity with the specified multiplier.
|
![]() ![]() | Subtract |
Subtracts the second quantity from the first. The quantities must have the same Unit.
|
![]() | ToString |
Returns a String that represents this instance.
(Overrides ObjectToString.) |
![]() | ToString(CultureInfo) |
Returns a String that represents this instance.
|
Name | Description | |
---|---|---|
![]() | Round |
Rounds the quantity as per the precision, supported by the system (0.001).
(Defined by QuantityExtensions.) |