Double.Parse - Internationalization problem

前端 未结 6 666
故里飘歌
故里飘歌 2020-12-17 10:04

This is driving me crazy. I have the following string in a ASP.NET 2.0 WebForm Page

string s = \"0.009\";

Simple enough. Now, if my culture

6条回答
  •  旧时难觅i
    2020-12-17 10:47

    what Jess's writing works for me. just for anyone who'd need to try out how to get "invariant culture": it looks this

    double d = Double.Parse(myString, CultureInfo.InvariantCulture);

    (first stackoverflow post, so yea, rather marginal ;)

提交回复
热议问题