-2

How can I convert final amount of billing to it's related vocabulary form?

I am trying to develop a function which convert it in vocabulary form.

For, ex. 12345 Rs. then it's output should be like this

TWELVE THOUSAND THREE HUNDRED N FORTY FIVE ONLY

is it possible with few easy steps in C# ?

Panagiotis Kanavos
  • 120,703
  • 13
  • 188
  • 236

1 Answers1

4

If you are willing to use an external library, i'd suggest you try out Humanizer

Really simply to use and your example would be as simple as.

12345.ToWords(); //it adds extension methods that achieve this.
scartag
  • 17,548
  • 3
  • 48
  • 52