Click here to Skip to main content
15,912,837 members
Please Sign up or sign in to vote.
1.33/5 (2 votes)
See more:
How to create a class for convert numeric value to words? and how to use it?
Posted
Updated 9-Jul-13 20:46pm
v3
Comments
rizwan muhammed khan gouri 10-Jul-13 2:38am    
Please explain what you want?
Thanks7872 10-Jul-13 2:52am    
You need help with what? Creating class?convert numeric value to word[what you mean by word?]or how to use classes?

 
Share this answer
 
If you mean to convert an integer,unsigned integer, double, or anything that stores data as a numeric value to a string (that's what contains words) then :
First declare a string and a integer/double/uint or anything that supports numeric values, like this :
int a;

Second declare a string :
string output;

This will help us convert and store the converted number.
Declare another string to print the data on the screen :
string print;

Assign Values to them,
a = 1234;

Now here's the main code :
output = a.ConvertToString(); //Converts the integer to a string and assigns it to a store variable
output = print;
Console.WriteLine(print);//Prints the output variable on the screen
Console.ReadLine();

Problems? Write that in the comment section.
If you think that you have got the solution to the problem just click on the 'Green' 'Accept Solution' button.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900