ICurrencyConverter

Ecng.Net.Currencies

Provides methods to convert one currency to another.

Методы

GetRateAsync
public Task<decimal> GetRateAsync(CurrencyTypes from, CurrencyTypes to, DateTime date, CancellationToken cancellationToken)
result = iCurrencyConverter.GetRateAsync(from, to, date, cancellationToken)

Retrieves the conversion rate from one currency to another for a specified date.

from
The source currency type.
to
The target currency type.
date
The date for which the conversion rate is applicable.
cancellationToken
A cancellation token to monitor for cancellation requests.

Возвращает: A task that represents the asynchronous operation. The task result contains the conversion rate as a decimal.