Skip to content

simple and light persian number converter, for use in .NET Core projects.

Notifications You must be signed in to change notification settings

mojtabamoradi/PersianNumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PersianNumber

simple and light persian number converter, for use in .NET Core projects.

Adding Moraba.Persian.Numbers.Core package to your .NET Core project

you can add this package from nuget.

Package Manager

Install-Package Moraba.Persian.Numbers.Core

.NET CLI

dotnet add package Moraba.Persian.Numbers.Core

usage

      try
      {
          //convert persian number to english
          string persianNumbers = "-۱۲۳۴۵"; 
          string englishNumber =  Moraba.Persian.Numbers.Convert.PersianToEnglish(persianNumbers);;
          //output : "-12345"
          
          //convert numbers to persian text
          string numberText =  Moraba.Persian.Numbers.Convert.NumberToText(persianNumbers);
          //output : "منفی دوازده هزار و سیصد و چهل و پنج"
          
      }
      catch (Exception ex)
      {
          Console.WriteLine(ex.Message);
      } 

https://github.com/mojtabamoradi/PersianNumber

About

simple and light persian number converter, for use in .NET Core projects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages