Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2012/5.0 > BOOK: Beginning Visual C# 2012
|
BOOK: Beginning Visual C# 2012
This is the forum to discuss the Wrox book Beginning Visual C# 2012 by Karli Watson, Jacob Vibe Hammer, Jon Reid, Morgan Skinner, Daniel Kemper, Christian Nagel, ; ISBN: 978-1-118-31441-8
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# 2012 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2013, 02:58 PM
Authorized User
 
Join Date: Apr 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 14 Lambda Expression as Delegates and Expression Trees

In this section, bottom of Pg 369, the last paragraph; "This expression can be represented...", concludes with a sentence that uses the last Try It Out (Ch14Ex06) as an example of where you could use the generic delegate types instead of the TwoIntegerOperationDelegate delegate. Not having any luck making this work. I've tried Google, Bing, and a Pluralsight training video but I'm just not seeing how to do this.

Has anyone done this that would be willing to help clue me in? Thanks in advance.
 
Old July 16th, 2013, 10:50 AM
Authorized User
 
Join Date: Apr 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Figured it out.

After rereading several times the light finally came on.

WAS:
//delegate int TwoIntegerOperationDelegate(int paramA, int paramB);
//private static void PerformOperations(TwoIntegerOperationDelegate del)

CHANGED TO:
private static void PerformOperations(Func<int, int, int> del)

Knew it had to be simple, just wasn't seeing it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 14 Lambda Expression as Delegates and Expression Trees TJinWI BOOK: Beginning Object-Oriented Programming with C# 3 July 16th, 2013 10:05 AM
LINQ query \ LAMBDA expression - complex requirement sumitshah4u .NET Framework 3.5 0 March 16th, 2009 04:36 AM
seek a expression petergoodman XSLT 3 July 16th, 2008 01:45 AM
Message> in query expression <expression>. (Error ybg1 Access 5 July 15th, 2007 05:42 AM
'OR' Expression saturdave ASP.NET 1.0 and 1.1 Basics 2 February 17th, 2004 03:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.