Hi,
please see code below
string strValue="(1000*15)/100";
decimal calculatedValue=convert.toDecimal(strValue);
it is giving a error
I want ot convert string of formula containing values to decimal
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Mar 16, 2013, 5:13 AM EDT
The output should be:
Result: 150
Mallesh50 reputationPosted Mar 18, 2013, 10:44 PM EDT
Thank very much its working fine
Kunal VaishyaRank #990 · 2K reputationPosted Mar 19, 2013, 12:37 AM EDT
http://www.codeproject.com/Articles/30999/ScriptEngine-User-Defined-Calculations-in-C-VB-JSc