9
Kashmir
40d

funny thing:
Convert.ToDecimal("1.0") will yield 1.0 if your windows is in english and yield 10 if it's in portuguese.

nice.

Comments
  • 3
    What happens when you to Convert.ToDecimal(“1,0”) ?
  • 3
    Pass in whatever the culture invariant arg is.
  • 2
    @bkwilliams it returns a vector with direction 0 and magnitude 1
  • 0
    @bkwilliams that should work in turkish
  • 0
    The same thing also happens when you press the dot/period key at the bottom of your keypad.
    En-us? "."
    Tr-tr? ","
  • 0
    Definitely an interesting feature! I am pretty sure the devs had the best intentions :)
  • 1
    I had no idea which language is this and a quick google revealed you can fix this by adding CultureInfo.InvariantCulture. Does it work correctly then?
  • 1
    @qwwerty yep, it just didn't make much sense to me having CultureInfo.InstalledUICulture as default
  • 2
    @Kashmir if you build desktop apps for windows its a sensible default.
Add Comment