W4G.Extensions 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package W4G.Extensions --version 1.0.0                
NuGet\Install-Package W4G.Extensions -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="W4G.Extensions" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add W4G.Extensions --version 1.0.0                
#r "nuget: W4G.Extensions, 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 W4G.Extensions as a Cake Addin
#addin nuget:?package=W4G.Extensions&version=1.0.0

// Install W4G.Extensions as a Cake Tool
#tool nuget:?package=W4G.Extensions&version=1.0.0                

W4G.Extensions

Este reposit�rio cont�m uma cole��o de extens�es para facilitar o desenvolvimento em diversas plataformas.

Atualmente em constru��o, o objetivo � fornecer uma biblioteca de recursos �teis e comuns para agilizar o processo de desenvolvimento.

Recursos Dispon�veis (em constante atualiza��o)

  • ToCurrency:
  • Extens�es para trabalhar com forma��o de valores monet�rios.
  • Aplica-se a: tipos int, double ou decimal.

Como Utilizar

  1. Instala��o via NuGet: Voc� pode instalar as extens�es via NuGet Package Manager executando o seguinte comando no Console do Gerenciador de Pacotes:
  2. Instala��o via NuGet: Voc� pode instalar as extens�es via NuGet Package Manager executando o seguinte comando no Console do Gerenciador de Pacotes:
Install-Package W4G.Extensions
  1. Exemplos de Utiliza��o:
  • ToCurrency:
using W4G.Extensions;
class Program
{
    static void Main()
    {
        double valor = 12345.6789;

        Console.WriteLine("Valor Informado: " + valor);
        Console.WriteLine();
        Console.WriteLine("Valor formatado: " + valor.ToCurrency());
        Console.WriteLine("Valor formatado sem arredondamento: " + valor.ToCurrency(truncValue: true));
        Console.WriteLine("Valor formatado sem casas decimais): " + valor.ToCurrency(0));
        Console.WriteLine("Valor formatado com 3 casas decimais: " + valor.ToCurrency(3));
        Console.WriteLine("Valor formatado com 3 casas decimais e sem arredondamento: " + valor.ToCurrency(3, true));
        Console.WriteLine("Valor formatado usando a moeda (US)): " + valor.ToCurrency(cultureName: "en-US"));
    }
}

Output:

Valor Informado: 12345,6789

Valor formatado: R$ 12.345,68
Valor formatado sem arredondamento: R$ 12.345,67
Valor formatado sem casas decimais): R$ 12.346
Valor formatado com 3 casas decimais: R$ 12.345,679
Valor formatado com 3 casas decimais e sem arredondamento: R$ 12.345,678
Valor formatado usando a moeda (US)): $12,345.68

Contribuindo

Contribui��es s�o bem-vindas! Sinta-se � vontade para abrir issues para relatar bugs, sugerir novas funcionalidades ou enviar pull requests com melhorias.

Licen�a

Este projeto � licenciado sob a MIT License.

Este README.md fornece uma vis�o geral do reposit�rio, lista os recursos dispon�veis, explica como instalar e usar as extens�es, e tamb�m encoraja contribui��es.

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. 
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 116 5/12/2024
1.0.5 119 5/7/2024
1.0.4 124 5/4/2024
1.0.3 122 5/4/2024
1.0.2 110 4/30/2024
1.0.1 105 4/28/2024
1.0.0 111 4/28/2024