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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:41:52+00:00 2026-06-07T20:41:52+00:00

we got regional related web client, where currency is set as in regional format,

  • 0

we got regional related web client, where currency is set as in regional format, which we parse like:

bool result = decimal.TryParse(currencyValue, NumberStyles.Currency, myCulture, out value);

when we serialize this decimal to xml and decimal was previously parsed in myCulture=en-US, xmlserializer returns <Curr id="2" amnt="100000000.00"/> and deserialize it back to same number… but when we do it in sk-SK or cs-CZ it returns <Curr id="2" amnt="100000000,00"/> which returns *100 on deserialization (ignores comma)…

is there possibility to remove this regional from decimal, or make it invariant?
(if I don’t want to convert it to string and parse back again to handle regionals)

  • 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-07T20:41:54+00:00Added an answer on June 7, 2026 at 8:41 pm

    so I write answer to my own question, to can close this theme…

    there was a new interesting point, what I get today morning after begin working. Problematic decimal was added to the distionary before serializing, which is a little bit problem, because IDictionary can;t be serialized, until it implement IXmlSerializable. There are two methods to override, ReadXml and WriteXml. And here is the goal, in WriteXml there was used decimalValue.ToString(), which makes the problem. I dont know why it is, but this .ToString() returns the missmatch results what I describe in question. I dont know, how it happens, because in testing project it works perfect, but in our full context don’t. But as agent Mulder believed, the truth is out there

    So only what I need to do, was decimalValue.ToString() changing to decimalValue.ToString(CultureInfo.InvariantCulture)

    thx for your time.

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

Sidebar

Related Questions

I've got a regional based solution for Dynamics CRM 2011 (online). You can set
Got a strange problem created a little stored proc which need to execute a
Got a c#.net app which I need to modify. The query at the moment
Got into confusion I have to do book shelf for tablet. Which holds books
Got a little problem. I'd like to create an android list view activity with
got code looking like this: // This is com.n.common.Networking.downloadBmp( ) function // ... byte[]
Got myself stuck... Us left and right limits in nested set model to store
got a simple web site, in html. I do a simple function to move
Got a table with 1200 rows. Added a new column which will contain incremental
Got an exception during migration Web application from WAS 6.1 to WAS 7. This

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.