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 9157525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:02:24+00:00 2026-06-17T13:02:24+00:00

So i am working on an application that does some calculations. It reads some

  • 0

So i am working on an application that does some calculations. It reads some numbers from a txt, it converts them to double and after it multiplies them it gives the result.

Lets say the txt has the numbers 10.5 and 2

string string1 = "10.5", string2 = "2";
double double1 = Convert.ToDouble(string1), double2=Convert.ToDouble(string2);
double double3=double1*double2;
textbox.text= double3.ToString();

The result I always get on emulator is 21 while on my device i get 210. I tried reinstalling the app from the phone, restarting the phone and the pc and i tried this over 10 times. I still get different results on my phone. What should i do?

PS: i tried double.parse but still the same

  • 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-06-17T13:02:26+00:00Added an answer on June 17, 2026 at 1:02 pm

    On the basis that the phone and emulator are working under different locales, then this SO question answers what is really being asked how-to-convert-string-to-double-with-proper-cultureinfo

    Of course you are now going to have to match your text file to the corrected locale.

    Also see what-does-cultureinfo-invariantculture-mean

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

Sidebar

Related Questions

Greetings, I'm working on a JS-based application that does some complex work and logs
I'm working on creating a headless console application in QT4 that does some OpenGL
I'm working on a project that does some intense math calculations (arrays of matrices,
I'm working on some application that should fetch current location and after device is
Currently I am working on a ajax-based web application that does some XHR. I
I'm working on application that does some tests on Windows Servers. Front end of
I'm working on an application that downloads some data from the internet using NSData's
I'm working on an application that does processing at what I'd call fairly high
I'm working on an application that contains some buttons defined via layout.xml like this
I've been working intermittently on an Excel spreadsheet for a customer that does some

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.