What is Expression Trees?
Expression Trees was first introduced in C# 3.0 (Visual Studio 2008), where they were mainly used by LINQ providers. Expression trees represent code in a tree-like format, where each node is an expression (for example, a method call or a binary operation such as x < y).
You can also convert expression trees into compiled code and run it. This transformation enables dynamic modification of executable code as well as the execution of LINQ queries in various databases and the creation of dynamic queries.
I think the easiest that to do this to write a recursive descent parser. But old guys like me that learned Forth at one point or another might want to use an infix to postfix order converter using a stack and then evaluate the stack using postfix evaluation. I'm sure a search on either will probably produce ready to go code, but you'll lean more for your homework by checking Wikipedia for infix and postfix and learning the algorithm and coding it from scratch using your web hosting such as siteground (http://www.sitegroundwebhostingreviews.com/). If you have functions and operator precedence make sure you check the shunting-yard algorithm.
|All times are GMT. The time now is 05:37 AM.|
Powered by: vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.