Convert.Int32("0")causes{"Input string was not in a correct format

G

Guest

Convert.Int32 fails for "0" but works fine for all other numbers.

This does not work on one machine when "0" it works fine on other machines
Convert.ToInt32(“0â€);
gives exception {"Input string was not in a correct format."}

If I specify base 10 this works on all machines
Convert.ToInt32(“0â€,10);

So I have 3 related questions.
1. Why is it only happen when I am converting a "0".
2. Why does it work when I declare base 10
3. Why is this problem only occuring on 1 machine.

Somethings I have tried.
1. Compiled the code on another machine. The compiled code runs fine on the
other machines. I would think this eliminates coding/compiler issues.
2. Repaired .NET 2.0 framework
3. Reinstalled .NET 2.0 framework
4. Moved same code & binaries to other machines and had no problems.

Is there some machine/system or framework setting that could cause this
problem.

Any ideas would be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top