Use the global alias. : Namespace Alias « Language Basics « C# / CSharp Tutorial






using System;  
  
using Ctr = Counter;  
 
namespace Counter {  
  class MyClass {  
  }  
}  
  
// Declare another class called CountDown, which  
// is in the global namespace.  
class MyClass { 
} 
 
class GlobalAliasQualifierDemo {  
  public static void Main() {  
 
    Ctr::MyClass m = new Ctr::MyClass();  
 
    // Next, create CountDown object from global namespace. 
    global::MyClass m2 = new global::MyClass();  
  }  
}








1.6.Namespace Alias
1.6.1.Use the global alias.
1.6.2.Aliasing Namespace Names
1.6.3.Aliasing Class Names
1.6.4.Using a Namespace Directive
1.6.5.Using the alias keyword to refer to a nested namespace.
1.6.6.Simple Aliases for namespace
1.6.7.Global Namespace Alias