Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

private Modifier

Declares that a class member has private visibility.

private statement

Required. A class member definition.

The private modifier makes a member of a class visible only within that class. Code outside the current class, including derived classes, cannot access private members.

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

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.