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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:02:40+00:00 2026-05-25T15:02:40+00:00

Is decimal separator (‘.’ or ‘,’ ) depends of CurrentCulture ? I have a

  • 0

Is decimal separator (‘.’ or ‘,’ ) depends of CurrentCulture?

I have a problem in serialization XML.
When I type ‘,’ as separator, I have an exception. (Culture is setted as DE-de)

Regards

example ( TestProperties is my own class for testing)

TestProperties properties = new TestProperties 

Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(cultureName);

double tempValue = 1.23 // Or 1,23
properties.DoubleValue = tempValue;

XmlSerializer serializer = new XmlSerializer(typeof(TestProperties));
TextWriter textWriter = new StreamWriter(XMLPath);
serializer.Serialize(textWriter, properties);
textWriter.Close();


public class TestProperties
    {   
        private double _doubleValue;
        [XmlElement("Double")]
        public double DoubleValue
        {
            get { return _doubleValue; }
            set { _doubleValue = 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-25T15:02:40+00:00Added an answer on May 25, 2026 at 3:02 pm

    It depends entirely on the context. You mention xml; within xml, the format is usually represented in a non-cultural culture (which means: . is decimal and , is thousands etc). Similarly, xml has specific representations for dates/times.

    If you are building your xml via XmlWriter, XElement, XmlSerializer (etc) this will be automatic; if you are building it by hand it could well be confused (a mix of different representations).

    If the data is not in the expected format, you might have to load it into a string property (rather than, say, a float etc), and process it separately.

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

Sidebar

Related Questions

I have a source XML that uses a dot (.) as a decimal separator
In the example below, comma is the decimal separator. I have this : 125456,89
This is, basically, a CultureInfo problem. Formally, in my country, the decimal separator is
I have a XML where all values are stringified accordingly to a given culture
How can I tell Sybase to use a comma as a decimal separator instead
As I understand it, Europeans(*) write numbers with a comma for a decimal separator,
Is it possible to use the comma as a decimal separator in sprintf in
I seek for way to use locale-based decimal separator in my perl-scripts. For now
I have a table with prices in this format: 1.234,56, (the thousands separator is
In Polish regional setting decimal separator is , . In english it is .

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.