Jon Jagger
jon@jaggersoft.com
Table of Contents 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Notes DownloadECMA-334 C# Language Specificationpreviousnextprevious at this levelnext at this level 17 Classesprevious at this levelnext at this level 17.2 Class membersprevious at this levelnext at this level 17.2.6 Nested typesprevious at this levelnext at this level 17.2.6.2 Declared accessibility Paragraph 11 Non-nested types can have public or internal declared accessibility and they have internal declared accessibility by default. 2 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: [Example: The example
public class List  
{  
   // Private data structure  
   private class Node  
   {   
      public object Data;  
      public Node Next;  
      public Node(object data, Node next) {  
         this.Data = data;  
         this.Next = next;  
      }  
   }  
   private Node first = null;  
   private Node last = null;  
   // Public interface  
   public void AddToFront(object o) {...}  
   public void AddToBack(object o) {...}  
   public object RemoveFromFront() {...}  
   public object AddToFront() {...}  
   public int Count { get {...} }  
}  
declares a private nested class Node. end example]
{ JSL }
Jagger Software Ltd
Company # 4070126
VAT # 762 5213 42
Valid HTML 4.01Valid CSS