### Install as Cake Tool Source: https://www.nuget.org/packages/NumericWordsConversion Use this directive to install the package as a Cake tool. ```Cake Script #tool nuget:?package=NumericWordsConversion&version=2.1.1 ``` -------------------------------- ### Install as Cake Addin Source: https://www.nuget.org/packages/NumericWordsConversion Use this directive to install the package as a Cake addin. ```Cake Script #addin nuget:?package=NumericWordsConversion&version=2.1.1 ``` -------------------------------- ### Install Package using Package Manager Console Source: https://www.nuget.org/packages/NumericWordsConversion This command is intended for use within the Package Manager Console in Visual Studio. ```PowerShell NuGet\Install-Package NumericWordsConversion -Version 2.1.1 ``` -------------------------------- ### Install Package using Package Manager Console Source: https://www.nuget.org/packages/NumericWordsConversion/2.0.0 This command is intended for use within the Package Manager Console in Visual Studio. ```PowerShell NuGet\Install-Package NumericWordsConversion -Version 2.0.0 ``` -------------------------------- ### Install as a Cake Tool Source: https://www.nuget.org/packages/NumericWordsConversion/2.0.0 Use this directive to install the NumericWordsConversion package as a tool within a Cake build script. ```Cake Script #tool nuget:?package=NumericWordsConversion&version=2.0.0 ``` -------------------------------- ### Install as a Cake Addin Source: https://www.nuget.org/packages/NumericWordsConversion/2.0.0 Use this directive to install the NumericWordsConversion package as an addin within a Cake build script. ```Cake Script #addin nuget:?package=NumericWordsConversion&version=2.0.0 ``` -------------------------------- ### Reference Package in C# File-Based Apps Source: https://www.nuget.org/packages/NumericWordsConversion The #: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. ```C# #:package NumericWordsConversion@2.1.1 ``` -------------------------------- ### Reference Package in C# File-Based Apps Source: https://www.nuget.org/packages/NumericWordsConversion/2.0.0 The #: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. ```C# #:package NumericWordsConversion@2.0.0 ``` -------------------------------- ### Add Package using .NET CLI Source: https://www.nuget.org/packages/NumericWordsConversion Use this command to add the package to your project via the .NET command-line interface. ```.NET CLI dotnet add package NumericWordsConversion --version 2.1.1 ``` -------------------------------- ### Version Package in Directory.Packages.props (CPM) Source: https://www.nuget.org/packages/NumericWordsConversion For projects supporting Central Package Management (CPM), copy this XML node into the solution's Directory.Packages.props file. ```XML ``` -------------------------------- ### Version Package using Central Package Management (CPM) Source: https://www.nuget.org/packages/NumericWordsConversion/2.0.0 For projects supporting CPM, copy this XML node into the solution's Directory.Packages.props file to version the package. ```XML ``` -------------------------------- ### Reference Package in Project File Source: https://www.nuget.org/packages/NumericWordsConversion For projects supporting PackageReference, copy this XML node into your project file. ```XML ``` -------------------------------- ### Configure Default Conversion Options Source: https://www.nuget.org/packages/NumericWordsConversion Sets default conversion options for both numeric words and currency words throughout the application. This is typically done once during application startup. ```csharp NumericWordsConfiguration.ConfigureConversionDefaults(options => { //For Numeric Words Conversion options.SetDefaultNumericWordsOptions(new NumericWordsConversionOptions { Culture = Culture.International, DecimalSeparator = "dot", DecimalPlaces = 2 }); }); //For Currency Words Conversion options.SetDefaultCurrencyWordsOptions(new CurrencyWordsConversionOptions { Culture = Culture.Nepali, OutputFormat = OutputFormat.English, CurrencyUnitSeparator = "and", CurrencyUnit = "rupee", CurrencyNotationType = NotationType.Prefix, SubCurrencyUnit = "paisa", EndOfWordsMarker = "and" }); ``` -------------------------------- ### Add Package using Paket CLI Source: https://www.nuget.org/packages/NumericWordsConversion Use this command to add the package to your project via the Paket command-line interface. ```Paket CLI paket add NumericWordsConversion --version 2.1.1 ``` -------------------------------- ### Reference Package in Project File (CPM) Source: https://www.nuget.org/packages/NumericWordsConversion For projects supporting Central Package Management (CPM), copy this XML node into the project file. ```XML ``` -------------------------------- ### Add Package using Paket CLI Source: https://www.nuget.org/packages/NumericWordsConversion/2.0.0 Use this command to add the NumericWordsConversion package to your project via the Paket CLI. ```Paket CLI paket add NumericWordsConversion --version 2.0.0 ``` -------------------------------- ### Add Package using .NET CLI Source: https://www.nuget.org/packages/NumericWordsConversion/2.0.0 Use this command to add the NumericWordsConversion package to your project via the .NET CLI. ```.NET CLI dotnet add package NumericWordsConversion --version 2.0.0 ``` -------------------------------- ### Reference Package using PackageReference Source: https://www.nuget.org/packages/NumericWordsConversion/2.0.0 For projects supporting PackageReference, copy this XML node into your project file to reference the package. ```XML ``` -------------------------------- ### Use Default Numeric and Currency Word Conversion Source: https://www.nuget.org/packages/NumericWordsConversion Applies the globally configured default conversion options to convert a decimal amount to numeric words and currency words using simple extension methods. ```csharp decimal amount = 100000.01M; amount.ToNumericWords(); //Outputs: One hundred thousand dot zero one. amount.ToCurrencyWords(); //Outputs: Rupees one lakh and one paisa. ``` -------------------------------- ### Convert Decimal to Currency Words (Default) Source: https://www.nuget.org/packages/NumericWordsConversion Converts a decimal amount to its currency word representation using default international settings. This is a simple extension method for quick conversions. ```csharp decimal amount = 100000.12; CurrencyWordsConverter converter = new CurrencyWordsConverter(); string words = converter.ToWords(amount) //OR SIMPLY string words = amount.ToCurrencyWords(); //Outputs: One hundred thousand dollar and twelve cents only ``` -------------------------------- ### Reference Package in F# Interactive or Polyglot Notebooks Source: https://www.nuget.org/packages/NumericWordsConversion/2.0.0 The #r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or script source code. ```F# #r "nuget: NumericWordsConversion, 2.0.0" ``` -------------------------------- ### Convert Decimal to Words Source: https://www.nuget.org/packages/NumericWordsConversion/2.1.1 Demonstrates converting a decimal number to its word representation using the NumericWordsConverter class or the extension method. ```csharp decimal amount = 100000.12; NumericWordsConverter converter = new NumericWordsConverter(); string words = converter.ToWords(amount); //OR SIMPLY string words = amount.ToNumericWords(); //Outputs: One hundred thousand point one two ``` -------------------------------- ### Convert Decimal to Currency Words (Custom Units) Source: https://www.nuget.org/packages/NumericWordsConversion Converts a decimal amount to currency words with fully customized currency units, separators, and end markers. Allows for unique currency representations. ```csharp CurrencyWordsConverter converter = new CurrencyWordsConverter(new CurrencyWordsConversionOptions() { Culture = Culture.International, OutputFormat = OutputFormat.English, CurrencyUnitSeparator = string.Empty, CurrencyUnit = "pound", SubCurrencyUnit = "pence", EndOfWordsMarker = "" }); string words = converter.ToWords(00000.12M); //Outputs: One hundred thousand pound twelve pence ``` -------------------------------- ### Convert Decimal to Currency Words (Custom Culture/Format) Source: https://www.nuget.org/packages/NumericWordsConversion Converts a decimal amount to currency words with specified culture and output format. Useful for internationalization or specific display requirements. ```csharp CurrencyWordsConverter converter = new CurrencyWordsConverter(new CurrencyWordsConversionOptions() { Culture = Culture.Nepali, OutputFormat = OutputFormat.English }); string words = converter.ToWords(100000.12M); //Outputs: One lakh rupees and twelve paisa only ``` -------------------------------- ### Reference Package in F# Interactive Source: https://www.nuget.org/packages/NumericWordsConversion The #r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or script source code. ```F# #r "nuget: NumericWordsConversion, 2.1.1" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.