[Solved] C# Convert To Decimal String Value like 0.33 [closed]


This should fix your problem (if I understand the problem, that is):

var number = decimal.Parse("0,55".Replace(',', '.'), CultureInfo.InvariantCulture);

EDIT

Not every culture uses the point (.) symbol as the decimal separator. If you don’t specify a format provider, the framework defaults to the current culture. I’m guessing that in this particular case, the decimal.Parse() method was interpreting "0,55" as decimal 55.0.

2

solved C# Convert To Decimal String Value like 0.33 [closed]