Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

protected Modifier 

Declares that a class member or interface member has protected visibility.


protected statement

statement

Required. A class member or interface member definition.

The protected modifier makes a member of a class or interface visible only within that class or interface and all derived classes of the current class. Code outside the current class cannot access protected members.

Classes and interfaces in the global scope cannot be marked with the protected modifier. Any member of a class or interface (including nested classes and nested interfaces) can be marked with the protected modifier.

You may not combine the protected modifier with any of the other visibility modifiers (public, private, or internal).

Community Additions

ADD
Show:
© 2015 Microsoft