Table of Contents

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

Value long

The 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

long

Methods

ToDecimal()

Converts the currency value to a decimal.

public decimal ToDecimal()

Returns

decimal

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

value ComCurrency

Returns

decimal

implicit operator ComCurrency(decimal)

Converts a decimal to a ComCurrency.

public static implicit operator ComCurrency(decimal value)

Parameters

value decimal

Returns

ComCurrency

Exceptions

OverflowException

The value is out of the range of a currency value.