Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want to use a conversion value from a textbox and then convert it into a decimal value so it is usable for calculations.
Posted
Updated 1-May-14 8:24am
v2
Comments
Sergey Alexandrovich Kryukov 30-Apr-14 3:56am    
What's wrong with just reading standard MSDN documentation?
—SA
Anas Tasadduq 30-Apr-14 10:35am    
It'll waste my time to search for it in MSDN.
Sergey Alexandrovich Kryukov 30-Apr-14 11:00am    
Aha, you think that wasting the time of community is better. How nice!

No, you still waste your time. You know why? Because, with such attitude, the whole idea to learn programming is a total waste of time; you won't be able to do any programming, guaranteed. Just forget about programming, before you wasted even more time.

—SA
Anas Tasadduq 30-Apr-14 11:20am    
You are right. But what I had posted I did not mean it. So sorry if you did not like my comment. I'll be careful next time!
And I can't forget about programming. I love programming and I spend time on it.
Sergey Alexandrovich Kryukov 30-Apr-14 11:22am    
Please, no need to apologize. This is about your life, not mine. You need to be careful not with comments, it's okay, but with appropriate effort when you need to reach something.
Sorry if I misunderstood you.

Thank you for understanding.
—SA

1 solution

You do not "convert", you parse the string. Use one of the string methods Parse or TryParse. Read about them:
http://msdn.microsoft.com/en-us/library/system.string.aspx[^].

—SA
 
Share this answer
 

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