Specification
Original: "C # Version 3.0 Specification", Microsoft
Translation: Lover_p
The expression tree allows lambda expressions to be represented as data structures rather than executable code. A lambda expression that can be converted to a delegate type D can also be converted to an expression tree of type system.query.expression<d>. Converting a lambda expression to a delegate type causes the executable code to be generated and referenced by the delegate, and converting it to an expression tree type causes the code that created the expression tree instance to be emitted (Emit). An expression tree is an efficient, in-memory (in-memory) data representation of a lambda expression, and makes the structure of the expression transparent and explicit.
The following example displays a lambda expression for executable code and expression tree respectively. Because of the existence to the Func<int, the int> conversion, therefore exists to the Expression<func<int, int>> conversion.
Func<int, int> f = x => x + 1; Code
Expression<func<int, int>> e = x => x + 1; Data
After these assignments are complete, the delegate F identifies a method that returns X + 1, whereas the expression tree E represents a data structure that describes the expression x + 1.
Attention
The structure of the expression tree will be converted to a separate specification. This specification does not apply in the PDC 2005 Technical Preview.