Decimal delimiter in C#
I just made an application which purpose is to find an x result using the rule of three. It runs fine and everything but there is a small problem. I am using WinXP European Spanish version. As we all know, in many European countries the decimal dot is changed by a " , " comma. When I use my application, it turns out that when I press the dot key on my keyboard´s number pad, my application doesn't take it as a normal decimal dot and it ignores it... so I need to manually press the comma key so it can give me the right ans开发者_运维问答wer.
How can I solve this problem?
It comes down to locale, I think, and just for kicks, you can try changing the keyboard locale on your system. I'm on Windows 7, but it's probably somewhat similar in Windows XP. Go to the Control Panel, look for "region" or "language". In Windows XP you might have to click on an "Advanced Settings" button, and there you can change the "decimal symbol" and "digit grouping symbol". I hope this is a workable solution for you!
精彩评论