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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -