Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Compare cell phone plans using Wirefly's innovative plan comparison tool ×
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:

The most difficult thing in the world is to know how to do a thing and to watch someone else doing it wrong, without commenting. -- T.H. White

Working...