Click here to Skip to main content
15,904,926 members
Home / Discussions / C#
   

C#

 
QuestionCompile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 1:49
kontax12-Sep-08 1:49 
AnswerRe: Compile a project from code, or explanations about CodeDom... Pin
leppie12-Sep-08 2:05
leppie12-Sep-08 2:05 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 2:11
kontax12-Sep-08 2:11 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
leppie12-Sep-08 2:17
leppie12-Sep-08 2:17 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 2:27
kontax12-Sep-08 2:27 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
leppie12-Sep-08 2:31
leppie12-Sep-08 2:31 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 2:33
kontax12-Sep-08 2:33 
AnswerRe: Compile a project from code, or explanations about CodeDom... Pin
Giorgi Dalakishvili12-Sep-08 2:43
mentorGiorgi Dalakishvili12-Sep-08 2:43 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 2:52
kontax12-Sep-08 2:52 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
Giorgi Dalakishvili12-Sep-08 3:10
mentorGiorgi Dalakishvili12-Sep-08 3:10 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 3:25
kontax12-Sep-08 3:25 
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 

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.