Struct ComCurrency
- Namespace
- CsCom.Runtime
- Assembly
- CsCom.Runtime.dll
An OLE Automation currency value (CURRENCY). It has the layout of CURRENCY, so it can be used in blittable
structures, and converts implicitly to and from decimal.
public readonly record struct ComCurrency : IEquatable<ComCurrency>
- Implements
- Inherited Members
Constructors
ComCurrency(long)
An OLE Automation currency value (CURRENCY). It has the layout of CURRENCY, so it can be used in blittable
structures, and converts implicitly to and from decimal.
public ComCurrency(long Value)
Parameters
ValuelongThe currency value: a 64-bit integer scaled by 10,000.
Properties
Value
The currency value: a 64-bit integer scaled by 10,000.
public long Value { get; init; }
Property Value
Methods
ToDecimal()
Converts the currency value to a decimal.
public decimal ToDecimal()
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
implicit operator decimal(ComCurrency)
Converts a ComCurrency to a decimal.
public static implicit operator decimal(ComCurrency value)
Parameters
valueComCurrency
Returns
implicit operator ComCurrency(decimal)
Converts a decimal to a ComCurrency.
public static implicit operator ComCurrency(decimal value)
Parameters
valuedecimal
Returns
Exceptions
- OverflowException
The value is out of the range of a currency value.