The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I'm evaluating Calculate on an English version of WinXP (SP2) with Swedish regional settings and I'm running into a strange problem with decimal separators when using CalcQuick.
The help file states that Calculate uses a period as the default separator. If I use a simple formula, e.g. 1.2 + 1.2, the period is ignored and the calculated result (using ParseAndCompute) is 24!
If I set CalcEngine.ParseDecimalSeparator to a comma and use the same formula, e.g. 1,2 + 1,2, I get the correct answer but that doesn't really help me since the application I'm thinking of using Calculate for will be distributed worldwide and regional settings just have to work.
I've tried changing the regional settings on my computer to English but that didn't help.
How can I get the class to accept a period as a decimal separator? What am I missing?
Try these settings to see if they give you what you want. cq = new CalcQuick(); CalcEngine.ParseDecimalSeparator = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator[0]; CalcEngine.ParseArgumentSeparator = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator[0];
If the regional setting is Swedish and your users type 1,1+1,2 they should then get the value 2,3