• Email this page
  • Print this page
  • Share this page

C# Delegates, Anonymous Methods, and Lambda Expressions – O My!

Posted in Technology by UpperStrata on January 14, 2010

From Code Project's Josh Fischer, a step-by-step explanation of the different ways to create delegates and clear confusion through a guided example that starts with .NET 1.1.

"Delegates, anonymous methods, and lambda expressions can be very confusing in .NET. I think this is proven in code like the example below. Which one of the calls to First compiles? Which one returns the answer we are looking for; namely the Customer with the ID 5. The answer, incidentally, is that all six calls to First not only compile, but all find the correct customer and are functionally equivalent. If you are at all confused as to why this is true, this article is for you."

Read the full article: http://www.codeproject.com/KB/cs/DelegatesOMy.aspx


Connect

Contact Us

1432 Edinger Avenue, Suite 120
Tustin, CA 92780

Email:
info@upperstrata.com
Phone:
949.393.9409

To get your project started, please give us a few details.

Client Login

Insights

Categories

Feeds