Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
private Modifier

private Modifier

Declares that a class member has private visibility.

private statement

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).

Community Additions

ADD
Show:
© 2015 Microsoft