Easy.Tools.NumberHelpers 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Easy.Tools.NumberHelpers --version 1.0.0
                    
NuGet\Install-Package Easy.Tools.NumberHelpers -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="Easy.Tools.NumberHelpers" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Easy.Tools.NumberHelpers" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Easy.Tools.NumberHelpers" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Easy.Tools.NumberHelpers --version 1.0.0
                    
#r "nuget: Easy.Tools.NumberHelpers, 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.
#:package Easy.Tools.NumberHelpers@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Easy.Tools.NumberHelpers&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Easy.Tools.NumberHelpers&version=1.0.0
                    
Install as a Cake Tool

Easy.Tools.NumberHelpers

Easy.Tools.NumberHelpers is a .NET library that provides a rich set of extension methods for numeric operations. This package helps with common number manipulations such as clamping, rounding, percent calculations, and converting numbers to words in multiple languages.


Installation

Install via NuGet:

dotnet add package Easy.Tools.NumberHelpers

Or via NuGet Package Manager:

Install-Package Easy.Tools.NumberHelpers

Features

  • Clamp values to a given range
  • Calculate percentages
  • Increase or decrease values by percentage
  • Convert numbers to words in different languages
  • Currency-aware number to word conversion (e.g., USD, EUR, TRY)
  • Multilingual support (English, Turkish, Azerbaijani, Russian, and more)

Supported Languages in ToWords()

  • English (en)
  • Turkish (tr)
  • Azerbaijani (az)
  • Russian (ru)
  • More coming soon...

Currency names are mapped based on (language, country) and can be overridden as needed.


Available Extensions

General

int number = 125;
number.Clamp(0, 100); // 100

double percent = 25.0;
100.0.PercentageOf(400);        // 25
100.0.IncreaseByPercent(10);    // 110
100.0.DecreaseByPercent(10);    // 90

Number to Words

123.ToWords("en"); // one hundred twenty-three
123.ToWords("tr"); // yüz yirmi üç
-45.ToWords("az"); // mənfi qırx beş

Currency Words

decimal amount = 1234.56m;
amount.ToCurrencyWords("en", "US"); // one thousand two hundred thirty-four US dollars and fifty-six cents
amount.ToCurrencyWords("tr", "TR"); // bin iki yüz otuz dört Türk Lirası ve elli altı kuruş

License

MIT License.


© 2025 Elmin Alirzayev / Easy Code Tools

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.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.

Version Downloads Last Updated
1.0.6 12 8/12/2025
1.0.5 167 8/6/2025
1.0.4 162 8/6/2025
1.0.3 162 8/6/2025
1.0.2 162 8/6/2025
1.0.1 163 8/6/2025
1.0.0 66 8/1/2025