Archive

Posts Tagged ‘parsing’

Parsing large numbers to words (english)

May 8, 2011 1 comment

I’ve occasionally seen a request for this functionality pop up in the forums over the years. A developer is given the task to write out in words a number the way it may be spoken by a person. Actually, a more common use for this functionality is with bank checks where we write out the amount in words. So $1,234.56 would be written out as One Thousand Two Hundred Thirty Four Dollars and Fifty Six Cents. It’s amusing that the people who search for this functionality in code are surprised and even annoyed that the .NET framework does not have this built in… as if the framework does not have enough stuff already, right? A while back I came up with a solution for this based on a forum request (see the revised code at the bottom). I thought I would share this here again as a separate blog post. Actually, I decided to upgrade the code a tad just for the sake of never leaving good enough alone 😉
Read more…