Jump to content
Beehive "this." Syntax Question
2 replies to this topic
Posted 27 February 2014 - 10:51 AM
In the beehive solution, page 284(3rd edition) why use this.shiftsToWork = numberOfShifts instead of simply stating shiftsToWork = numberOfShifts
I don't see why "this" has to be used here. Am I missing something?
Posted 28 February 2014 - 12:34 PM
Wow, nice catch! No, you're not missing anything, that 'this' is extraneous. The funny thing is that was there in the second edition, too. Thousands and thousands of people have seen that code, but I think you're the first person to notice it. Good work!
Author, Head First C#
Building Better Software -- http://www.stellman-greene.com
Posted 01 March 2014 - 12:17 PM
Glad I wasn't crazy and that it seems I'm actually understanding something
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users