Global Namespace Alias : Namespace Alias « Language Basics « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

class Configuration {}

namespace My
{
    class Configuration {}

    class GlobalNamespaceAlias
    {
        static void Main()
        {
            Console.WriteLine(typeof(Configuration));
            Console.WriteLine(typeof(global::Configuration));
            Console.WriteLine(typeof(global::My.GlobalNamespaceAlias));
        }
    }
}








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