Chapter 10 minor issue with the Class library
Edit: it looks like i am wrong I have discovered that adding a class with the class diagram tool and using the tool box... makes a class automatically public when added so if that is what they used in the book then I guess they did not need to specify.... the add class from right clicking in solution explorer or going to the project menu though makes it private by default.
Following the instructions in the book it tells you to add a Class and it's methods and members using the class diagram. But what it doesn't tell you to do is for instance on the Deck class......... to make the class public. There is no option for this in the class details you have to go over to the solution explorer properties window to change the access modifier of the class unless you do it by hand.
The book didn't mention changing that value, and when it said to add code to the definition the access modifier wasn't in bold so it is not obvious (to a beginner) that you need to change it too.
Just saying......
i could be wrong I might have missed the step somewhere but I don't think I did.
Last edited by notig; September 27th, 2010 at 01:57 AM..
|