O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

11.3. protected Members

Chapter 10 discussed access modifiers public and private. A class’s public members are accessible wherever the app has a reference to an object of that class or one of its derived classes. A class’s private members are accessible only within the class itself. A base class’s private members are inherited by its derived classes, but are not directly accessible by derived-class methods and properties. In this section, we introduce access modifier protected. Using protected access offers an intermediate level of access between public and private. A base class’s protected members can be accessed by members of that base class and by members of its derived classes.

All non-private base-class members retain their original access ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required