Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
Giorgi Dalakishvili12-Sep-08 3:37
mentorGiorgi Dalakishvili12-Sep-08 3:37 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 3:47
kontax12-Sep-08 3:47 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
Giorgi Dalakishvili12-Sep-08 3:53
mentorGiorgi Dalakishvili12-Sep-08 3:53 
QuestionCalculator Pin
Burim Rama12-Sep-08 1:26
Burim Rama12-Sep-08 1:26 
AnswerRe: Calculator Pin
stancrm12-Sep-08 1:31
stancrm12-Sep-08 1:31 
AnswerRe: Calculator Pin
blackjack215012-Sep-08 1:33
blackjack215012-Sep-08 1:33 
GeneralRe: Calculator Pin
Burim Rama12-Sep-08 1:37
Burim Rama12-Sep-08 1:37 
GeneralRe: Calculator Pin
blackjack215012-Sep-08 2:22
blackjack215012-Sep-08 2:22 
Just out of curiosity I downloaded the library you mentioned and it works for me. This is my small test:

info.lundin.Math.ExpressionParser exp = new info.lundin.Math.ExpressionParser();

Hashtable h = new Hashtable();
h.Add("x", "1");
h.Add("y", "1,5");
h.Add("z", "0,23");

double result = exp.Parse("x + y + z", h); 
MessageBox.Show(result.ToString()); 


The result is 2,73 -just as expected.

EDIT:
If you want to take the expression directly from a textbox, use this code:
info.lundin.Math.ExpressionParser exp = new info.lundin.Math.ExpressionParser();

Hashtable h = new Hashtable();

double result = exp.Parse(myTextBox.Text, h); 
MessageBox.Show(result.ToString()); 


This also works for me. However (just a guess), you might get that error because you are using incorrect decimal separator for your culture. On my machine the comma is the separator, but for you it might be the dot. Check it.
GeneralRe: Calculator Pin
Burim Rama12-Sep-08 2:32
Burim Rama12-Sep-08 2:32 
GeneralRe: Calculator Pin
leppie12-Sep-08 2:33
leppie12-Sep-08 2:33 
GeneralRe: Calculator Pin
Burim Rama12-Sep-08 2:40
Burim Rama12-Sep-08 2:40 
GeneralRe: Calculator Pin
leppie12-Sep-08 2:42
leppie12-Sep-08 2:42 
GeneralRe: Calculator Pin
Burim Rama12-Sep-08 2:44
Burim Rama12-Sep-08 2:44 
GeneralRe: Calculator Pin
leppie12-Sep-08 2:47
leppie12-Sep-08 2:47 
GeneralRe: Calculator Pin
Burim Rama12-Sep-08 3:06
Burim Rama12-Sep-08 3:06 
GeneralRe: Calculator Pin
Paul Conrad12-Sep-08 5:41
professionalPaul Conrad12-Sep-08 5:41 
AnswerRe: Calculator Pin
Paul Conrad12-Sep-08 5:39
professionalPaul Conrad12-Sep-08 5:39 
AnswerRe: Calculator Pin
nelsonpaixao12-Sep-08 14:06
nelsonpaixao12-Sep-08 14:06 
QuestionError reponse while using MSCOMM Pin
tauras8112-Sep-08 0:22
tauras8112-Sep-08 0:22 
AnswerRe: Error reponse while using MSCOMM Pin
Alan N12-Sep-08 1:52
Alan N12-Sep-08 1:52 
AnswerRe: Error reponse while using MSCOMM Pin
leppie12-Sep-08 2:20
leppie12-Sep-08 2:20 
AnswerRe: Error reponse while using MSCOMM Pin
carbon_golem12-Sep-08 2:50
carbon_golem12-Sep-08 2:50 
Questiondatalist column Pin
soujanya G12-Sep-08 0:05
soujanya G12-Sep-08 0:05 
AnswerRe: datalist column Pin
Manas Bhardwaj12-Sep-08 0:21
professionalManas Bhardwaj12-Sep-08 0:21 
QuestionSending Mail Using Console Application Pin
HatakeKaKaShi11-Sep-08 23:25
HatakeKaKaShi11-Sep-08 23:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.