tags:

views:

82

answers:

1

I am having a web application created in asp.net. In that we are having designer files for my user controls. In that controls are defined like following.


protected global::Common.Controls.ETextBox txtDummy;

what is the meaning of global key word in above statement

+1  A: 

It refers to the global namespace. It allows you to compile things like:

class System
{
    static void Main(string[] args)
    {
       global::System.Console.WriteLine("Hello, world");
    }
}

Note that the class is called System and without the global keyword this won't compile as it won't find any static property called Console in this class. This being said you should never name your class System.

Darin Dimitrov