Define an alias to represent a namespace : NameSpace : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » NameSpace »

 

Define an alias to represent a namespace








    

// 
using CmpDb = YourCompany.SecondPartNamespace.InnerNamespace.YourClass;

namespace YourCompany.SecondPartNamespace {
  namespace InnerNamespace {
    public class YourClass {
      public static void Open( string tblName ) {
         System.Console.WriteLine("{0}", tblName );
      }
    }
  }
}

public class CH1_14 {
  public static void Main() {
    CmpDb.Open("fred");
  }
}


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» NameSpace