disable broken tests on net_4_0
[mcs.git] / docs / ecma334 / 17.2.6.2.xml
blobe0b0d169c8b50f229e5fb253edf730a3a59135a9
1 <?xml version="1.0"?>
2 <clause number="17.2.6.2" title="Declared accessibility">
3   <paragraph>Non-nested types can have public or internal declared accessibility and they have internal declared accessibility by default. Nested types can have these forms of declared accessibility too, plus one or more additional forms of declared accessibility, depending on whether the containing type is a class or struct: <list><list_item> A nested type that is declared in a class can have any of five forms of declared accessibility (public, protected internal, protected, internal, or private) and, like other class members, defaults to private declared accessibility. </list_item><list_item> A nested type that is declared in a struct can have any of three forms of declared accessibility (public, internal, or private) and, like other struct members, defaults to private declared accessibility. </list_item></list></paragraph>
4   <paragraph>
5     <example>[Example: The example <code_example><![CDATA[
6 public class List  
7 {  
8    // Private data structure  
9    private class Node  
10    {   
11       public object Data;  
12       public Node Next;  
13       public Node(object data, Node next) {  
14          this.Data = data;  
15          this.Next = next;  
16       }  
17    }  
18    private Node first = null;  
19    private Node last = null;  
20    // Public interface  
21    public void AddToFront(object o) {...}  
22    public void AddToBack(object o) {...}  
23    public object RemoveFromFront() {...}  
24    public object AddToFront() {...}  
25    public int Count { get {...} }  
26 }  
27 ]]></code_example>declares a private nested class Node. end example]</example>
28   </paragraph>
29 </clause>