I am incredibly puzzled.
I have made a small, fairly simple calculator for specific purposes. I can run this fine on my computer. But when I try to run it on a target computer (from Norway) I get an error that puzzles me.
Here's the strange behavoir:
Expand|Select|Wrap|Line Numbers
- textBox.Text = "1";
- double result = double.Parse(textBox.Text) * .15;
This is where it get's wierd:
Expand|Select|Wrap|Line Numbers
- textBox.Text = "1.1";
- double result = double.Parse(textBox.Text) * .15;
So the problem is converting a String to a Double.
More specifcaly this piece of code:
Expand|Select|Wrap|Line Numbers
- double.Parse(textBox.Text)
Expand|Select|Wrap|Line Numbers
- textBox.Text = "1.1";
I have coded the calculator to where you can only enter valid characters to the textBox. (numbers and one decimal are allowed)
When I get the error from the computer in Norway, it's telling me that I can't convert "1.1" in the textBox to a Double. Which should work, but for some odd reason doesn't. I've tried a lot of differant things like taking the "1.1" from the textBox and putting it in a string, then trying to parse that, same error. So what I'm wonering is if there might be some type of language conversion problem, or something buggy with that computer?
Both computers have Win7, and the latest .NET framework. Which reminds me that I have used the 4.0 Beta framework to program this, so what I also tried was re-writing for 3.5. Which also gave me the same error.