I’m using .net. Is there some code somewhere that can change
$11,456.50 -> eleven thousand four hundred fifty six and 50/100 Dollars
I can do it myself, but don’t want to rewrite something that’s already there.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is an unpolished first shot. No error checking at all and the code does not handle the fractional part. And it is almost untested. With BigInteger the method can handle values up to
10^66 - 1or about219bits easily extended by adding more entries toM2.Called on
Decimal.MaxValuethe method returns the following.seventy-nine octillion, two hundred twenty-eight septillion, one hundred sixty-two sextillion, five hundred fourteen quintillion, two hundred sixty-four quadrillion, three hundred thirty-seven trillion, five hundred ninety-three billion, five hundred forty-three million, nine hundred fifty thousand, three hundred thirty-five