Parsing written number to numeric

I saw a question on the MSDN forums on how to parse a number written out to a numeric value. This got me thinking on how it could be done and I made a sample on how to do it. It is dynamic and can be extended to support other languages by changing the dictionaries.
Here is a class I came up with that handles it. It does not validate the number so there is some work left to be done to fully handle it. The same logic can be reversed to write out a numeric as text.

TextToNumber.cs (5.45 kb)

Leave a Reply

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