Wrong result from IsNumeric() in VB.NET -


i have function in vb.net loops through values , attempts convert decimal if isnumeric true,

dim value string  if isnumeric(value) = true     rate = ctype(value, decimal)  <--- bombing here end if 

i've found when function receives value 603e43 isnumeric evaluates true reason , bombs on conversion. why isnumeric true in case?

see http://support.microsoft.com/kb/329488

isnumeric returns true if can converted double true 603e43 value larger decimal can hold

you use decimal.tryparse funcion working alternative. see http://msdn.microsoft.com/en-us/library/9zbda557.aspx


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -