Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

math matic problem in c#

Status
Not open for further replies.

hlybbi

Programmer
Mar 19, 2003
91
IS
double vsk = Convert.ToInt32(SumAllStr)*0.19;

i allways get Input string was not in a correct format.

but the string is 109000

can anybody tell me what i am doing wrong


Best regards Hlynur
 
The input string must be in an incorrect format.

This works for me:

Code:
Dim SumAllStr As String = "109000"
Dim vsk As Double = Convert.ToInt32(SumAllStr) * 0.19

vsk = 20710.0


----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Is it possible that the input string has commas, decimal points, spaces, etc. in it from where a user entered it?

For example, a european user might enter
[tab]109.000,00
because a dot is the thousands seperator in their country, and the comma is their decimal separator.

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top