ColonesExchangeRate 1.0.1
See the version list below for details.
dotnet add package ColonesExchangeRate --version 1.0.1
NuGet\Install-Package ColonesExchangeRate -Version 1.0.1
<PackageReference Include="ColonesExchangeRate" Version="1.0.1" />
paket add ColonesExchangeRate --version 1.0.1
#r "nuget: ColonesExchangeRate, 1.0.1"
// Install ColonesExchangeRate as a Cake Addin #addin nuget:?package=ColonesExchangeRate&version=1.0.1 // Install ColonesExchangeRate as a Cake Tool #tool nuget:?package=ColonesExchangeRate&version=1.0.1
ColonesExchangeRate NuGet Package
This NuGet package is a .NET library based on .NET Standard 2.1 that provides functionality for currency conversion from Colones (Costa Rica - CRC ₡) to Dollars (United States - USD $) and Euros (European Union - EUR €).
Information about the exchange rate
This NuGet package consumes the exchange rate through an API from Ministerio de Hacienda de Costa Rica, you can access the API in the following link: https://api.hacienda.go.cr/indicadores/tc (The API is in Spanish).
Installation
You can install the ColonesExchangeRate NuGet package using NuGet or GitHub Packages.
To install ColonesExchangeRate using NuGet, run the following command in the Package Manager Console:
Install-Package ColonesExchangeRate
Usage
To use ColonesExchangeRate, first create an instance of the CurrencyConverter class:
var converter = new CurrencyConverter();
Then, you can use the following methods to perform currency conversion:
decimal dolaresAColones = await converter.DollarsToColones(amount);
decimal colonesADolares = await converter.ColonesToDollars(amount);
decimal dolaresAEuros = await converter.DollarsToEuros(amount);
decimal eurosADolares = await converter.EurosToDollars(amount);
decimal colonesAEuros = await converter.ColonesToEuros(amount);
decimal eurosAColones = await converter.EurosToColones(amount);
// true or false to get the date as part of the exchange rate information.
(DateTime? date, decimal sale, decimal purchase) dollarExchangeRate = await converter.GetDollarExchangeRate(true);
(DateTime? date, decimal dollars, decimal colones) euroExchangeRate = await converter.GetEuroExchangeRate(true);
The result will look similar to this:
Note: Replace amount with the amount of currency you want to convert.
The GetDollarExchangeRate and GetEuroExchangeRate methods return a tuple with three values: the date of the exchange rate, the sale rate, and the purchase rate.
Contributing
Contributions are welcome! To contribute to ColonesExchangeRate, fork the repository and create a pull request with your changes.
License
ColonesExchangeRate is licensed under the MIT License. See the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- System.Text.Json (>= 7.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.