p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: C# 5.0 Programmer's Reference (http://p2p.wrox.com/forumdisplay.php?f=755)
-   -   Chapter 3 Errata (http://p2p.wrox.com/showthread.php?t=95083)

enderandpeter October 5th, 2015 04:54 PM

Chapter 3 Errata
 
Page 49

Exercise number 4, in the second set of exercises, refers to the form button as setBackgroundButton, but it should actually be setBackgroundProperty to match the Name given in Exercise 2 on page 48.

Rod Stephens October 6th, 2015 11:43 AM

Sorry about that. You're right that the names should match.

Microsoft's preferred naming convention says the name should end with the name of the control, so this should probably be setBackgroundButton and step 2 off the instructions should be corrected. But really it doesn't matter as long as they agree.

enderandpeter October 6th, 2015 11:46 AM

Yeah, totally. The names just need to match is all. Thank a lot for informing me about Microsoft's recommended naming conventions, and for writing this excellent book.

Rod Stephens October 6th, 2015 11:58 AM

Yeah their preferred convention is purposeControlType as in setBackgroundButton. Kind of silly considering how dead-set they are against using a control name prefix as in btnSetBackground. [;)]

Some developers argue that you should leave off the control entirely because it shouldn't matter what kind of control it is. For example, it shouldn't matter whether setBackground is a button, menu item, or something else. But then what do you do if you want to have a menu and a button?

It doesn't really matter as long as you're consistent.

I'm glad you like the book. Post a review when you have a chance!


All times are GMT -4. The time now is 10:30 AM.

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