Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
Programming

Submission + - Building Expression Evaluator with Expression Trees in C# – Part 1 (aboutmycode.com)

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.

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:

"One lawyer can steal more than a hundred men with guns." -- The Godfather

Working...