c# - Double.Parse("string") FormatException with correct input -


I'm trying to parse

  double. Purse (row data [j ++]).   

The input sting is correct ("7,412"), j = 123 so it worked till this point.

And even if I'm typing double. (Row data [j]) This works.

Is there a problem here?

You have a comma rather than your decimal separator

You should use allowHouse number type if it is thousands separator

  number style style = number style . Allow thousands. NumberStyles.Float; Double. Purse (value, style);   

Or you your comma. Before parsing using string.Replace with it is considered as a decimal separator

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -