C# Number To Words With “Humanizer”

The power of community is awesome and from that open source is taking place. With openness in mind the world of software development is getting better, more and more cool open source libraries popping up and this is not exceptional for .NET platform.

c# number to words

Humanizer is one of cool open source library for .NET platform. It has many extension methods that can save your life as software developer when deal with string and number manipulation and other types as well as stated by its author :

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities

In this blog post i’m just gonna show you how to use Humanizer to convert a number into words ( C# number to words), for other functionalities just refer to its official website.

C# Number To Words

Open up your Visual Studio, create new Console Project and install Humanizer using Nuget package manager either via graphical form or Package Manager Console, i prefer the latest. If you can’t find where Package Manager Console is simply open it in View->Other Windows->Package Manager Console

Type this command “Install-Package Humanizer” and hit enter

c# number to words

Now is the time for the magic. Add some lines of code below and see what happen next

Output:
c# number to words

See?
Very straightforward c# number to words!
Thank you to Scott Hanselman for pointing this out and big thanks to the author

Facebook Comments
 

Agung Setiawan

Agung Setiawan adalah software engineer di BukaLapak.com, penulis sekaligus pecinta sastra, dan pembaca buku

 
Halo, perkenalkan saya Agung Setiawan.
Saya Software Engineer di BukaLapak.
Simak pemikian saya soal dunia Software Engineering via Twitter di @agungsetiawanmu dan facebook
Blog ini saya update seminggu sekali jadi sering-sering saja mampir
Mau belajar Vim bareng saya?
Belajar ngoding dari nol menggunakan PHP

Leave a Reply

Your email address will not be published. Required fields are marked *