Namespaces are additive. : Namespace : Language Basics C# Examples


C# Examples » Language Basics » Namespace »

 

Namespaces are additive.









    
using  System;  
  

using  Counter;  
  

namespace  Counter  {  
    class  MyClass  {  
    }  
}  
  
namespace  Counter  {  
    class  MySecondClass  {  
    }  
}  
  
class  MainClass  {  
    public  static  void  Main()  {  
        MyClass  m  =  new  MyClass();  
        MySecondClass  cu  =  new  MySecondClass();  
    }  
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Language Basics
» Namespace