Wrox Programmer Forums
|
BOOK: Beginning Visual C# 2010
This is the forum to discuss the Wrox book Beginning Visual C# 2010 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, ; ISBN: 9780470502266
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# 2010 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 September 15th, 2010, 12:30 PM
Authorized User
 
Join Date: Jul 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Post Chapter 13: Defining Events

Pages 380 - 385, Defining Events. I can usually follow the code and figure out how things are connected. In the TRY IT OUT on page 381, I do not understand how MessageArrived in CheckForMessage method is null or not. Where in the program is MessageArrived set or not set? I've stepped through the program, used the immediate window to see where the value is but no luck. Again, where in the program is MessageArrived set to null or not, and how does the method determine this.
 
Old September 15th, 2010, 08:16 PM
Authorized User
 
Join Date: Jul 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Defining Events

After putting the book down again for several hours I figured it out. In the Main method MessageArrived is set to myDisplay.DisplayMessage. So, while the program is running the value of MessageArrived never changes. It is never null. The only condition that changes during program running is the random value. I remmed out this line in Main to test this. My bad!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 13 rock1233 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 October 6th, 2009 12:18 PM
Chapter 4: Controls, ViewState and Events BazNZ BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 14th, 2008 03:57 AM
Chapter 13 bwoll BOOK: Beginning Access 2003 VBA 1 June 7th, 2007 03:57 PM
Chapter 13 ElMorenito BOOK: Beginning ASP 3.0 0 January 14th, 2005 02:56 PM





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