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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:18:56+00:00 2026-05-28T01:18:56+00:00

Its all about double, float numbers and seperator. So my problem is: I always

  • 0

Its all about double, float numbers and seperator. So my problem is: I always get double value with dot seperator. If I convert it to string I get comma. If I change it back to double it gets dot again. Add some code here:

    data = Convert.ToDouble(read.ReadSingle()); // converts to -70.00
    Conv = Convert.ToString(data); // converts to -70,00 string
    laikinas[k, m] = double.Parse(Conv);  // and in array I'll get 70.00. 

I’am sure with region settings is everything good. I can see CurrentCulture as it must be.

BTW I changed region settings while I was a half made off project.

  • 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-28T01:18:57+00:00Added an answer on May 28, 2026 at 1:18 am

    A double has neither a dot nor a comma; it’s stored in some internal representation. When you look at it, for example, through the Visual Studio debugger, you see some string representation of it (the one which Visual Studio chooses to use). This string representation is irrelevant, it is only shown for debug purposes.

    If you convert your double into a string, you can choose which number format is used:

    • Convert.ToString(Double) is equivalent to Double.ToString(), which uses a decimal separator based on your current culture — hence, you get the comma (on your system) when using Convert.ToString.

    • If you use another method for conversion, for example, Double.ToString(IFormatProvider), you can specify the culture settings you want to use as a parameter. For example, myDouble.ToString(CultureInfo.InvariantCulture) will always use a dot as the decimal separator, independent of the user’s culture settings.

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

Sidebar

Related Questions

I am just learning about LINQ to XML in all its glory and frailty,
How would I go about replacing all of the double quotes in my batch
I have been trying to get this seemingly simple problem fixed for about half
All I know about the constraint is it's name ( SYS_C003415 ), but I
I would like to compress a folder and all its sub-folders/files, and email the
I'm looking for a container that keeps all its items in order. I looked
I want to fade out an element and all its child elements after a
I want the mc to be removed with All its timers, events,... Is there
PHP, for all its warts, is pretty good on this count. There's no difference
is there a commend to delete project from svn with all its revisions(total cleanup)

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.