Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3593494
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:35:04+00:00 2026-05-18T19:35:04+00:00

The code is compiled in VS2008 targeting .NET3.5. This is not reproducible on my

  • 0

The code is compiled in VS2008 targeting .NET3.5. This is not reproducible on my system. I suspect some sort of localization setting is at play but I don’t know much about that.

All other valid numbers seem to work fine. The bug is illustrated with this code (which causes the same exception but is not the production code):

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = "";
            do
            {
                str = Console.ReadLine();
                Console.WriteLine("\t\"{0}\"", Convert.ToDouble(str));
            }
            while (str != null);
        }
    }
}

At the command line, input of “0” crashes the app on at least one system I have encountered.

Stack trace from user’s PC:

System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info)
   at System.Convert.ToDouble(String value)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T19:35:05+00:00Added an answer on May 18, 2026 at 7:35 pm

    I remember this problem from a question a while back. The Parse() methods are affected by the user overrides in the Control Panel + Region and Language applet. IIRC, it is especially sensitive to the “Negative sign symbol” setting. Ask your user to correct the settings there.

    The reference question is here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application runs on a pSOS operating system. The code is compiled with Diab
I have this sample code which generates the following warning (VS2008 compiler with SP1):
I have some trouble with #define statements in my C++ code, however I'm not
I need to know what is code compiled unit in .net. It s located
I have a C++ assembly with both managed and umanaged code compiled to a
We get an abort when a C++ exception is thrown when running code compiled
I thought .Net code gets compiled into MSIL, so I always wondered how do
How would one go about loading compiled C code at run time, and then
Following code, when compiled and run with g++, prints '1' twice, whereas I expect
I installed the wxWidgets source code, compiled it and am linking the libraries thus

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.