Search Options
close
Search the following clips:
All Clips
Everyone's Clips
My Guides
Sign Up
Install
Learn More
Login
Lambda Expressions in 5 Minutes
travislaborde
follow
1
4-28-2008 7:05 AM
232 views
tags:
programming
,
.net
travislaborde
says:
code examples follow...
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Related Clips
Creative Code: 14 Ways to Learn From Creat...
FOSSwiki
FreeBookZone - free eBooks
Goodbye To Faulty Software?
Which Linux distribution should I use
Sam Gentile Defines SOA
The Golden Rule of Data Manipulation
More clips from
travislaborde
Talula Does The Hula From Hawaii
Japanese iPhones Get Exclusive Feature to...
Unit Test Boundaries
Today's Top Clips
Skeletal Cartoons
Apollo 14 astronaut claims aliens HAVE made contact
More bad news for alarmists
6 Plants That Will Grow (Almost) Anywhere
Richest Americans See Their Income Share Grow
Europe's worst genocide since Hitler
Good riddance
NASA: 70% of climate change due to Pacific oscillations, not CO2
That "do you have any Grey Poupon" joke is officially over
Kurt Vonnegut: How to Write with Style
visit the
Top Clips page
View the Top Clips from
April 28, 2008
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/909f2030-d2fb-45d4-8961-99a3b1e78f3a/37A24CC8-81F8-4265-B7DF-34EBC6EFCF60/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://blogs.msdn.com/johnwpowell/archive/2008/04/26/lambda-expressions-in-5-minutes.aspx" href="http://blogs.msdn.com/johnwpowell/archive/2008/04/26/lambda-expressions-in-5-minutes.aspx" style="font-size: 11px;">blogs.msdn.com</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://blogs.msdn.com/johnwpowell/archive/2008/04/26/lambda-expressions-in-5-minutes.aspx"><H4 class="BlogPostHeader">Lambda Expressions in 5 Minutes </H4></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://blogs.msdn.com/johnwpowell/archive/2008/04/26/lambda-expressions-in-5-minutes.aspx"><P mce_keep="true">You don't need a course in advanced calculus to understand Lambda Expressions. In fact, you can learn the basics in 5 minutes or less. To accomplish this, we are going to revise a code snippet for an event handler from .Net 1.1 syntax to a syntactically sweet Lambda Expression. Before we jump to the code, let's define some basic terms for this exercise:</P></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://blogs.msdn.com/johnwpowell/archive/2008/04/26/lambda-expressions-in-5-minutes.aspx"><P><STRONG><U>Delegate</U></STRONG><BR />A type that references a method (or a strongly-typed function pointer in c++ terms). <EM> The following variable of type EventHandler contains a reference to a method I would like run when Button1 is clicked.</EM></p> <P><STRONG><U>Named Method</U></STRONG><BR />A method with a name. <EM>When Button1 is clicked, execute the following named method "Button1_ClickHandler."</EM></p> <P><STRONG><U>Anonymous Method</U></STRONG><BR />A method without a name. <EM>When Button1 is clicked, execute the following statement(s): MessageBox.Show("You clicked Button1!");</EM></p> <P><STRONG><U>Anonymous Function</U></STRONG><BR />An anonymous method that returns a value.</p> <P><STRONG><U>Lambda Expression</U></STRONG><BR />An expression syntax for an anonymous function.</P></blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/37A24CC8-81F8-4265-B7DF-34EBC6EFCF60/blog/" title="blog or email this clip"><img src="http://content6.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Blog
Copyright
Privacy
EULA
OK