Link to home
Start Free TrialLog in
Avatar of oneDayAtaTime
oneDayAtaTimeFlag for United States of America

asked on

C#, Convert.ToInt32(string) question

  I've got some C# code in an inherited application that is not working. The problem seems to be that the input is a string consisting of a decimal number. The code is trying to convert the string to an integer, using the following line
Convert.ToInt32(string)

   I did some searching and it seems that this method is expecting a whole number string, and won't work with a decimal number string. Is that correct? Is there an easy fix for this? I am expecting both whole numbers and decimal numbers as input here. Thanks for the help!

ASKER CERTIFIED SOLUTION
Avatar of wdosanjos
wdosanjos
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Daniel Van Der Werken
Daniel Van Der Werken
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial