Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Comma as Decimal Symbol creating problem

Comma as Decimal Symbol creating problem

Scheduled Pinned Locked Moved C#
csharphelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sifar 0
    wrote on last edited by
    #1

    Hi All, I have a windows appliation. It creates problem when it runs with Dutch(Belgium) or some other language settings that set Decimal Symbol as Comma(,) and Digit Separator as Dot(.) Due to such settings, number like 2.22 or 22.2 will be considered as 222. Is there any way to run .net appliation under default English(US) settings irrespective of settings of Regional and Language Options? Without changing global settings on user's PC?

    Regards, -SIFAR.

    T 1 Reply Last reply
    0
    • S Sifar 0

      Hi All, I have a windows appliation. It creates problem when it runs with Dutch(Belgium) or some other language settings that set Decimal Symbol as Comma(,) and Digit Separator as Dot(.) Due to such settings, number like 2.22 or 22.2 will be considered as 222. Is there any way to run .net appliation under default English(US) settings irrespective of settings of Regional and Language Options? Without changing global settings on user's PC?

      Regards, -SIFAR.

      T Offline
      T Offline
      Tuwing Sabado
      wrote on last edited by
      #2

      Place this code under your main class. //Force application to use culture En-US. System.Globalization.CultureInfo cultureInfo = System.Globalization.CultureInfo.GetCultureInfo("en-US"); System.Threading.Thread.CurrentThread.CurrentCulture = cultureInfo; happy coding...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups