Full qualify name : Namespace : Language Basics C# Examples


C# Examples » Language Basics » Namespace »

 

Full qualify name





For example, the line




    
Console.WriteLine("A  simple  C#  program.");
    
   
  
   

can be rewritten as




    
System.Console.WriteLine("A  simple  C#  program.");
    
   
  
   

Namespaces Are Additive




    
namespace  OuterNS  {
    namespace  InnerNS  {
        //  ...
    }
}
    
   
  
   

can also be specified like this:




    
namespace  OuterNS.InnerNS  {
    //  ...
}
    
   
  
   





    
class  MainClass{

    public  static  void  Main()
    {

        int  count  =  1;
        System.Console.WriteLine("count  =  "  +  count);

    }

}
    
   
  
   



Output

count = 1


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Language Basics
» Namespace