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.3 Hiding Paragraph 11 A nested type may hide (§10.7.1.1) a base member. 2 The new modifier is permitted on nested type declarations so that hiding can be expressed explicitly. [Example: The example
using System;  
class Base   
{  
   public static void M() {  
      Console.WriteLine("Base.M");  
   }  
}  
class Derived: Base   
{  
   new public class M   
   {  
      public static void F() {  
         Console.WriteLine("Derived.M.F");  
      }  
   }  
}  
class Test   
{  
   static void Main() {  
      Derived.M.F();  
   }  
}  
shows a nested class M that hides the method M defined in Base. end example]
{ JSL }
Jagger Software Ltd
Company # 4070126
VAT # 762 5213 42
Valid HTML 4.01Valid CSS