Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional C# 4.0 and .NET 4
This is the forum to discuss the Wrox book Professional C# 4.0 and .NET 4 by Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner; ISBN: 9780470502259
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional C# 4.0 and .NET 4 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 20th, 2012, 03:30 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 28 Sample Code

I'm looking at Chapter 28 code samples, and cannot reconcile the printed book with the downloaded code sample. Specifically, (using kindle, so please excuse the lack of page numbers!) just after snippet SimpleCalculator/Calculator.cs, the book contains "The hosting application is a simple console application". In the code I downloaded the host is a wpf app, and the code snippets that follow refer to the console app I can't seem to find. So, I tried to add my own...using Wrox.ProCSharp.MEF.Properties does not recognize properties namespace, nor does the import of the ICalculator interface work. What am I missing here? Is there any update to the code download?

Thanks for any help
  #2 (permalink)  
Old June 20th, 2012, 04:27 PM
Wrox Author
Points: 1,151, Level: 13
Points: 1,151, Level: 13 Points: 1,151, Level: 13 Points: 1,151, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Location: Austria
Posts: 171
Thanks: 2
Thanked 53 Times in 53 Posts
Default

Quote:
Originally Posted by randaljay View Post
I'm looking at Chapter 28 code samples, and cannot reconcile the printed book with the downloaded code sample. Specifically, (using kindle, so please excuse the lack of page numbers!) just after snippet SimpleCalculator/Calculator.cs, the book contains "The hosting application is a simple console application". In the code I downloaded the host is a wpf app, and the code snippets that follow refer to the console app I can't seem to find. So, I tried to add my own...using Wrox.ProCSharp.MEF.Properties does not recognize properties namespace, nor does the import of the ICalculator interface work. What am I missing here? Is there any update to the code download?

Thanks for any help
The Properties namespace is coming from the normal Console app template. Did you change the default namespace to Wrox.ProCSharp.MEF? Then you should have the namespace Wrox.ProCharp.MEF.Properties. For the ICalculator interface, did you add a reference to the contracts-assembly?

Hope this helps
__________________
Christian
CN innovation
Visit my blog at: csharp.christiannagel.com
Follow me on twitter: @christiannagel
The Following User Says Thank You to ChristianNagel For This Useful Post:
randaljay (June 20th, 2012)
  #3 (permalink)  
Old June 20th, 2012, 06:08 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi, thanks for the quick response.

I botched the reference for ICalculator, quick fix, but I had to add a string property using the project properties page for AddInDirectory to force the update to app.config which was required for the properties namespace to be recoginzed.

I'm still wondering why the console host referred to in the text was not included in the sample solution I downloaded for this chapter however. The other projects I've reviewed from the downloads (though only a few to this point) fit the text in the book verbatim!

Thanks again, out of the woods here for the moment! Really getting good use out of the book too, nice job.
  #4 (permalink)  
Old July 31st, 2013, 06:38 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your given reply is helps me lots to solve my problem. Thank you for this reply.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 28 code missing rCobbley BOOK: Excel 2003 VBA Programmer's Reference 0 November 1st, 2006 05:42 PM
Beginning C# Source code(Chapter 27,28) jiguang_ma Wrox Book Feedback 0 December 15th, 2005 08:25 AM
Chapter 10 Sample Code jramkawsky BOOK: Professional Java Development with the Spring Framework 0 December 3rd, 2005 08:44 AM
Installation's sample Problem of chapiter 28 hmatar JSP Basics 0 March 26th, 2005 02:51 PM
chapter 25 -sample code LouMattera BOOK: Professional C#, 2nd and 3rd Editions 3 February 13th, 2005 06:39 AM



All times are GMT -4. The time now is 03:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.