Hidden types

The inner type declaration shadows the outter type.

You can reference the outter type with full qualified name.


using System;
namespace A{
  class classA{
  
  }
  namespace B{
     class classA{
     
     }
     class Test{
        void aMethod(){
            new classA(); // A.B.classA

            new A.classA(); // A.classA
        }
     }
  }

}
class Program
{
    
    static void Main(string[] args)
    {
      
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.