Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Top level private classes don't make much sense as they would be invisible to other types. Nested classes are allowed to be private.</p> <p>Here's an excerpt from C# language spec:</p> <blockquote> <p>3.5.2 Accessibility domains</p> <p>The accessibility domain of a top-level unbound type T (§4.4.3) that is declared in a program P is defined as follows:</p> <ul> <li>If the declared accessibility of T is public, the accessibility domain of T is the program text of P and any program that references</li> <li>P. If the declared accessibility of T is internal, the accessibility domain of T is the program text of P.</li> </ul> <p><strong>From these definitions it follows that the accessibility domain of a top-level unbound type is always at least the program text of the program in which that type is declared</strong>. The accessibility domain for a constructed type T is the intersection of the accessibility domain of the unbound generic type T and the accessibility domains of the type arguments A1, ...,AN.</p> <p>The accessibility domain of a nested member M declared in a type T within a program P is defined as follows (noting that M itself may possibly be a type):</p> <ul> <li>If the declared accessibility of M is public, the accessibility domain of M is the accessibility domain of T.</li> <li>If the declared accessibility of M is protected internal, let D be the union of the program text of P and the program text of any type derived from T, which is declared outside P. The accessibility domain of M is the intersection of the accessibility domain of T with D.</li> <li>If the declared accessibility of M is protected, let D be the union of the program text of T and the program text of any type derived from T. The accessibility domain of M is the intersection of the accessibility domain of T with D.</li> <li>If the declared accessibility of M is internal, the accessibility domain of M is the intersection of the accessibility domain of T with the program text of P.</li> <li>If the declared accessibility of M is private, the accessibility domain of M is the program text of T.</li> </ul> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload