Simple Aliases for namespace : Namespace Alias « Language Basics « C# / CSharp Tutorial






using System;
using WinForms = System.Windows.Forms;
using WebForms = System.Web.UI.WebControls;
using System.ComponentModel;

    class SimpleAliases
    {        
        static void Main()
        {
            Console.WriteLine (typeof (WinForms.Button));
            Console.WriteLine (typeof (WebForms.Button));
        }
    }








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