Your SlideShare is downloading. ×
From delegates, to lamdas and expression trees your guide to elegant code in c#.net 4.0
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

From delegates, to lamdas and expression trees your guide to elegant code in c#.net 4.0

713

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
713
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Microsoft MVP Chander Dhall
  • 2. Delegates – WHAT?A type that defines a method signature
  • 3. Delegates – WHAT?Function pointers but type safe
  • 4. Delegates – WHAT?Allow methods to be passed as parameters
  • 5. Delegates – WHAT?Can be chained together
  • 6. Delegates – WHY? Decoupling Code
  • 7. Delegates – WHY? Methods as Parameters
  • 8. Delegates – WHY?Muli-casting NOT Multi-tasking
  • 9. Delegates – WHY?Callbacks and Event Handlers
  • 10. Delegates – WHY? LINQ
  • 11. How to implement right? I can find all this online Where to implement?Why do I attend your talk?  How to implement?
  • 12. Demo
  • 13. Expression TreesReference executable code
  • 14. Expression Trees Form of Data structureReferences executable code
  • 15. Expression Trees Expression Lambda Binary ConstantExpression Expression Expression etc Expression<Tdelegate>
  • 16. Linq To ObjectsC# code with IL using delegates Results lambda
  • 17. Linq To ObjectsC# code with IL using Dynamic Sql lambda expression trees Results
  • 18. Expression Trees Immutable so cacheable
  • 19. Expression TreesComposable to complex behavior
  • 20. Expression TreesCompiled to delegate JITed to native code

×