about culture in c#
-
hi in windows application , i have 3 text boxes which takes intput as decimal now in en-US setting '.' is treated as '.' only but in da-DK (danish Denmark) ',' is treated as '.' and '.' is treated as ',' how to apply these settings to text boxes i found an alternative way like this i m replacing ',' as '.' in da-DK cuture i know that it is not the correct way is there any solutions for this
-
hi in windows application , i have 3 text boxes which takes intput as decimal now in en-US setting '.' is treated as '.' only but in da-DK (danish Denmark) ',' is treated as '.' and '.' is treated as ',' how to apply these settings to text boxes i found an alternative way like this i m replacing ',' as '.' in da-DK cuture i know that it is not the correct way is there any solutions for this
vijaylumar wrote:
how to apply these settings to text boxes
They apply themselves. A textbox has no idea what you're entering, it doesn't know it's a number. int.TryParse or float.Parse, or whatever, will use the current culture.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
vijaylumar wrote:
how to apply these settings to text boxes
They apply themselves. A textbox has no idea what you're entering, it doesn't know it's a number. int.TryParse or float.Parse, or whatever, will use the current culture.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
can you tell how to apply globalization in windows applications thanking you
-
can you tell how to apply globalization in windows applications thanking you
You can apply your chosen culture in overloaded methods if you don't want to use the default culture.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.