tags:

views:

166

answers:

2

As the title suggests I would like to convert a long number to the format with words using C#. The Culture settings don't seem to do this and I am just currently doing this

String.Format(new CultureInfo("en-IN"), "{0:C0}", Price)

But for very long numbers I would prefer the word format. I am not from India and only vaguely familiar with how the system works.

+1  A: 

While I can't give you the code itself, here's the system

  • 1 - One
  • 10 - Ten
  • 1000 - Thousand
  • 10000 - Ten Thousand
  • 100000 - Lakh
  • 1000000 - Ten Lakh
  • 10000000 - Crore
  • 100000000 - Ten Crore
  • 1000000000 - Arab
  • 10000000000 - Ten Arab
  • 100000000000 - Kharab
  • 1000000000000 - Ten Kharab
  • 10000000000000 - 1 Neel
  • 100000000000000 - 10 Neel
  • 1000000000000000 - 1 Padm

I had written the routines for an accounting package I made, so writing it is not particularly hard.

Cyril Gupta
Thanks, this is helpful.
Craig
+1  A: 
  • 1 - One
  • 10 - Ten
  • 1000 - Thousand
  • 10,000 - Ten Thousand
  • 1,00,000 - Lakh
  • 10,00,000 - Ten Lakh
  • 1,00,00,000 - Crore
  • 10,00,00,000 - Ten Crore

.. after this, Arab, Kharab, Neel etc are NOT in conventional use. Infact, even financial institutions follow this:

  • 100,00,00,000 - Hundred Crore
  • 1,000,00,00,000 - One Thousand Crore
  • 10,000,00,00,000 - Ten Thousand Crore
  • 1,00,000,00,00,000 - One Lakh Crore (Trillion)
  • 99,00,000,00,00,000 - Ninety-nine Lakh Crore (Trillion)

Once this number has been exceeded, they conveniently switch to millions/billions/trillions/quadrillions..

Ryan Fernandes