NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

4.6 Accessibility

Each declared item has an accessibility level.. When access to an entity is allowed, the entity is said to be accessible. Conversely, when access to an entity is disallowed, the entity is said to be inaccessible. Accessibility does not change the scope of an entity's name. The accessibility domain of a declaration is the set of all contexts in which the declared entity is accessible.

The five access levels are public, protected, friend, protected friend, and private. The most permissive access level is public, and the four other access levels are all subsets of public access. The least permissive access level is private, and the four other access levels are all supersets of private access.

The access level for a declaration is specified via an optional access modifier, which can be can be Public, Protected, Friend, Private or the combination of Protected and Friend. If no access modifier is specified, a default access level is used depending on the declaration context; the permitted access levels also depend on the declaration context.

There is never any restriction on the level of accessibility specified in a declaration. For example, a type declared with Private access may contain a type member with Public access.

AccessModifier ::= Public | Protected | Friend | Private