Upcoming SlideShare
×

# expression tree

492 views

Published on

Expression Tree
presented by Drake @20121207

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
492
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
11
0
Likes
0
Embeds 0
No embeds

No notes for slide
• NewArrayExpression, ConditionExpression
• http://msdn.microsoft.com/en-us/library/bb506649.aspx
• http://www.albahari.com/nutshell/predicatebuilder.aspx
• ### expression tree

1. 1. Expression Tree drake
2. 2. Expression• 3• a• !a• a+b• Math.Sin(a)• new StringBuilder()
3. 3. Expression• 3 ConstantExpression• aParameterExpression• !aUnaryExpression• a+bBinaryExpression• Math.Sin(a)MethodCallExpression• new StringBuilder()NewExpression
4. 4. Summary• 運算式的一個重要的特點就是它可以無限 地組合，只要符合正確的類型和語義• + 可以用於各類數數值型別的加法，那麼加 號的左右就可以是任何類型為相應數值的 表達式
5. 5. Example• a+2+3• (a + 2) => b, (b+3)
6. 6. Example• Math.Sin(a) + 3
7. 7. Expression• System.Linq.Expressions 1+2+3
8. 8. UsageSystem.Linq.Expressions.Expression
9. 9. Expressioin• Math.Sin(a)
10. 10. Usage
11. 11. Lambda Expression• (parameters) => expression
12. 12. Usage
13. 13. InvocationExpression
14. 14. Usage
15. 15. Expression.OrElse Method
16. 16. Usage
17. 17. Using PredicateBuilder
18. 18. PredicateBuilder Source Code
19. 19. • Thank you for your listening!