|
-
January 27th, 2010, 07:41 AM
#12
Re: Polymorphism violating private access modifier
 Originally Posted by nuzzle
No because you're accessing the object as a Base object.
I often do this in polymorphic designs to enforce that derived type objects are used only as base type objects. Methods just aren't accessible in derived objects.
How can they not be accessible considering my first post's sample code and output?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|