A class to convert a decimal variable into its spoken word equivalent string...
123.45 converts to "ONE HUNDRED AND TWENTY THREE DOLLARS, FORTY FIVE CENTS". It could be modified to remove the dollars and cents strings.
It can convert numbers in the range 0 to 1.0E+25 inclusive, so no negative numbers please.
Call it like this...
VB Code:
MessageBox.Show(CashToWords.WriteNumberInWords(Decimal.Parse("123.45")))
Its a shared method so there's no need to create an instance of the class first.
Enjoy![]()




Reply With Quote