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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:09:55+00:00 2026-06-10T03:09:55+00:00

ALL, I am trying to read the value of 1.5 from the initialization file

  • 0

ALL,

I am trying to read the value of 1.5 from the initialization file and present it as 1.50000 in the text control in Windows Forms.

Here is the code:

string value = ini.Read( "Form", "value" );
this.textcontrol.Text = String.Format( "{0:F5}", value );

The “value” variable does contain 1.5 but the text control also shows 1.5 instead of 1.50000.

What am I doing wrong?

Thank you.

[EDIT]

As suggested I tried to do following:

var doublevar = double.Parse( value, CultureInfo.InvariantCulture );
this.textcontrol.Text = doublevar.ToString( "{0:F5}" );

but what I did see in the control is {1:F5}.

Any idea?

[/EDIT]

  • 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-10T03:09:57+00:00Added an answer on June 10, 2026 at 3:09 am

    It should be like this

    string value = ini.Read( "Form", "value" );
    this.textcontrol.Text = String.Format("{0:0.00000}",  double.Parse(value));
    

    Here is more details String Format for Double [C#]

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

Sidebar

Related Questions

I am trying to read an integer value from a simple text file. Row
I am trying to read a value from HKEY_CURRENT_USER\Software\Classes on Windows 7 as a
I am trying to read cells value from asp.net GridView control in Client Site
I'm trying to read the content from a URL with Node.js but all I
Possible Duplicate: Reading Datetime value From Excel sheet I'm trying to read in a
What I'm trying to do is read the value for all the nodes in
i'm trying to read contents of PNG file. As you may know, all data
I'm trying Perl on Mac. I have to read an RTF text file. the
I'm trying to read all of the attributes in the 'Data' elements from an
Im trying to read a XML file from google API places and add to

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.