Wrox Programmer Forums
BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer
This is the forum to discuss the Wrox book Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer by Rod Stephens; ISBN: 9780470596906
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer 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 April 17th, 2011, 08:57 AM
Registered User
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question Chap 4 exercise 4

Hi Stephen, I noticed in lesson 4, exercise 4 that the checkboxes are named breakfastCheckBox and etc. but the name of the events are named chkBreakfast_CheckedChanged(...). I am a VBA programmer learning C# and was just curious to why and how you have two different names between the name of the control and the connected event.
Old April 17th, 2011, 09:40 AM
Rod Stephens's Avatar
Wrox Author
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts

Sorry about that. That's an editing inconsistency. The controls started with names like chkBreakfast and later got changed to names like breakfastCheckBox, but we missed some of the event handler names. They should all be consistent.

The only time a control's event handler shouldn't use its name is when the event handler is catching events for multiple controls. In that case, it's name should represent the group of controls rather than a single one if possible.

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exercise 1.5 TallThunda BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer 7 May 27th, 2013 04:37 PM
Chap 2 - Avatars and uploading files, (would apply to Chap 6 too) kenj BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 0 October 18th, 2009 03:14 PM
chap 2 exercise problem 6 iramwebtech BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 April 16th, 2009 04:14 PM
Chap. 14 Exercise 2 C#Book stoverje BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 July 1st, 2008 09:41 AM

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