Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
For the out-of-band Slashdot experience (mostly headlines), follow us on Twitter, or Facebook. ×
Programming

+ - Building Expression Evaluator with Expression Trees in C# – Part 1->

An anonymous reader writes: This is first part of a series about writing expression evaluator in C#. Even though there are several of them available already I decided to write my own as this one is based on expression trees and is very simple. The evaluator supports numeric expressions as well as expression with parameters.

In this part we will build a simple expression evaluator which will support expressions like this: “2+2, “2.7+3.2, “1.7+2.9+14.24+6.58, “84+15+4-4*3*9+24+4-54/3-5-7+47, “25/3+1.34*2.56+1.49+2.36/1.48, etc. It will however not be able to parse expression with parentheses or with variables. These features will be implemented in the coming posts.

Link to Original Source
This discussion was created for logged-in users only, but now has been archived. No new comments can be posted.

Building Expression Evaluator with Expression Trees in C# – Part 1

Comments Filter:

Getting the job done is no excuse for not following the rules. Corollary: Following the rules will not get the job done.

Working...