开发者

How to pass parameters into an Expression tree?

开发者 https://www.devze.com 2023-02-27 00:46 出处:网络
I am developing the parser for expressions like this: a1 + a2 + a3 > 0 and b <> \"\" or 开发者_运维百科c = \"source\"

I am developing the parser for expressions like this:

a1 + a2 + a3 > 0 and b <> "" or 开发者_运维百科c = "source"

I want to use expression tree and collect parameters (a1, a2..) while parsing expression. How to pass parameters into an Expression tree?

Edit: I am using .net 4.0


Wrap it in a lambda that takes the parameters you're interested in. Look at the second example on: http://msdn.microsoft.com/en-us/library/bb397951.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号