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

  • Home
  • SEARCH
  • 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 8719721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:51:58+00:00 2026-06-13T06:51:58+00:00

When i read from the XML file, i read it like this and it

  • 0

When i read from the XML file, i read it like this and it works,

decimal checkkkk = Config.Location.test.Longitude;
textBox3.Text = checkkkk.ToString(CultureInfo.InvariantCulture);

I want to write it back to the same XML file, I’m getting a error at this point..!

decimal value;
Configs.Location.test.Longitude = 
decimal.TryParse(textBox3.Text, NumberStyles.Any, CultureInfo.InvariantCulture.NumberFormat, out value);

What is the mistake?

  • 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-13T06:51:59+00:00Added an answer on June 13, 2026 at 6:51 am

    The method Decimal.TryParse returns the boolean data-type and not decimal.

    Decimal.TryParse, Converts the string representation of a number to its Decimal equivalent using the specified style and culture-specific format. A return value indicates whether the conversion succeeded or failed.

    Try to do it this way instead:

    decimal value;
    if (decimal.TryParse(textBox3.Text, NumberStyles.Any, CultureInfo.InvariantCulture.NumberFormat, out value)) 
    {
         rseConfigs.RseLocation.GpsCoordinates.Longitude = value;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a game, and I read dialogue text from an XML file. I'm
I need to read data from XML to a List<>. The XML file contains
I am developing a BlackBerry app which needs to read from an xml file.
I'm trying to read data from an xml file and display it in a
I have an XML file that I'm trying to read from here , and
I'm trying to read the data from an XML file, validating it against the
Is there a way to read off from an [external] xml (an xml file
I just started using rapidxml. I 1st create an xml file to read from.
I'm trying to read in some sample data from an XML file in a
I have one .net windows application I'm trying to read .xml file from c#

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.