GoogleCurrencyConverter 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package GoogleCurrencyConverter --version 1.0.0
NuGet\Install-Package GoogleCurrencyConverter -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GoogleCurrencyConverter" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GoogleCurrencyConverter --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GoogleCurrencyConverter, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GoogleCurrencyConverter as a Cake Addin #addin nuget:?package=GoogleCurrencyConverter&version=1.0.0 // Install GoogleCurrencyConverter as a Cake Tool #tool nuget:?package=GoogleCurrencyConverter&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#1
var baseAmount = 1.50M;
var baseCurrency = GoogleCurrency.GBP;
var targetCurrency = GoogleCurrency.BTC;
if (GoogleCurrencyConverter.TryConvert(baseAmount, GoogleCurrency.GBP, GoogleCurrency.BTC, out decimal amount))
Console.WriteLine($"{baseAmount} {baseCurrency} = {amount} {targetCurrency} ({targetCurrency.GetFullName()})");
else
Console.WriteLine("Error");
Console.ReadKey();
1.50 GBP = 0.000038 BTC (Bitcoin)
#2
var baseAmount = 1.50M;
var baseCurrency = GoogleCurrency.GBP;
var targetCurrency = GoogleCurrency.BTC;
decimal amount;
try
{
amount = GoogleCurrencyConverter.Convert(baseAmount, baseCurrency, targetCurrency);
}
catch (GoogleRequestException exception)
{
return; // internet connection problem / timeout
}
catch (GoogleResponseException exception)
{
return; // it can happen sometimes / library no longer work / VPN
}
Console.WriteLine($"{baseAmount} {baseCurrency} = {amount} {targetCurrency} ({targetCurrency.GetFullName()})");
Console.ReadKey();
1.50 GBP = 0.000038 BTC (Bitcoin)
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 2.1
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.