Decimal separator

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CyclingGirl
    New Member
    • Aug 2007
    • 2

    Decimal separator

    Hi all

    I'm busy with making a little project in C#
    The problem is that when I enter the body length with 1.72 the calculation is not working. If I enter 1,72 the calculation works. I think it has something to do with my regional settings. How can I make my program monkeyproof for dots and comma's?
    I hope you can help me out.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    If you are converting a string to a decimal, check the overloads of .Parse()

    Comment

    Working...