Quantity Class |
Namespace: Aloe.EnterpriseOne.Model
The Quantity type exposes the following members.
Name | Description | |
---|---|---|
![]() | Unit |
Gets the measurement unit of the quantity.
|
![]() | Value |
Gets the value of the quantity.
|
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 | |
---|---|---|
![]() ![]() | Addition |
Returns the sum of quantity a and b, which must have the same measurement unit
|
![]() ![]() | Division |
Implements the operator /.
|
![]() ![]() | Equality |
Implements the operator ==.
|
![]() ![]() | GreaterThan |
Compares first and second.
|
![]() ![]() | GreaterThanOrEqual |
Implements the operator >=.
|
![]() ![]() | Inequality |
Implements the operator !=.
|
![]() ![]() | LessThan |
Implements the operator <.
|
![]() ![]() | LessThanOrEqual |
Implements the operator <=.
|
![]() ![]() | Multiply(Decimal, Quantity) |
Implements the operator *.
|
![]() ![]() | Multiply(Quantity, Decimal) |
Implements the operator *.
|
![]() ![]() | Subtraction |
Subtracts the second quantity from the first. The quantities must have the same Unit.
|
Name | Description | |
---|---|---|
![]() | Round |
Rounds the quantity as per the precision, supported by the system (0.001).
(Defined by QuantityExtensions.) |
Quantity supports basic quantity arithmetic, which is measure-safe. For example, adding two quantities is measure-safe, because the two quantities are added successfully only if their measurement units are compatible. This helps avoid errors of inadvertently doing quantity arithmetic with incompatible measurement units.
The following basic rules are true for Quantity: