Click to See Complete Forum and Search --> : [RESOLVED] string to float


KB1IBH
June 24th, 2008, 07:31 PM
i've got a line of code where i need to convert a string ("58.00") to a float, but the only method i know of returns:

An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll

Additional information: Additional unparsable characters are at the end of the string.


float YW = system.Convert.ToInt32(splitval[I+1], 10);


anything else i can do?

KB1IBH
June 24th, 2008, 07:34 PM
nevermind, figured it out myself....

Arjay
June 24th, 2008, 07:58 PM
How about posting the answer so that others may benefit?