什么是防爆pression树木和你如何使用它们,为什么要使用它们?和你、用它、如何使用、要使

2023-09-02 01:53:11 作者:寂寞。無上限

我刚刚碰到我听过多次EX pression树的概念。我只是想了解什么是由前pression树,其目的意思。

I just came across the concept of expression trees which I have heard multiple times. I just want to understand what is meant by an expression tree and its purpose.

我会喜欢它,如果有人也直接我简单的解释使用和样品。

I would love it if someone could also direct me to simple explanations and samples of use.

推荐答案

这是前pression树是一种数据结构,包含前pressions,这基本上是code。所以这是一个树状结构,具有code。在它的一部分。这些作品的code然后可以通过运行前pression树了一组数据来执行。

An Expression Tree is a data structure that contains Expressions, which is basically code. So it is a tree structure with pieces of code in it. These pieces of code can then be executed by "running" the expression tree over a set of data.

有关EX pression树伟大的事情是,你可以在code建立起来;也就是说,你建立可执行code(或一系列步骤)的在code 的。您也可以修改code您通过其他前pressions更换前pressions执行它。

A great thing about expression trees is that you can build them up in code; that is, you build executable code (or a sequence of steps) in code. You can also modify the code before you execute it by replacing expressions by other expressions.

这是前pression是那么功能委托,如(INT X =>返回X * X)。

An Expression is then a function delegate, such as (int x => return x * x).

另请参见http://blogs.msdn.com/b/charlie/archive/2008/01/31/ex$p$pssion-tree-basics.aspx