Here is a question that I have had for some time but never actually got around to asking…
In quite a lot of the designer files that Visual Studio generates some of the variables are prefixed with global:: Can someone explain what this means, what this prefix does and where should I be using it?
The global namespace qualifier allows you to access a member in the global (“empty”) namespace.
If you were to call an unqualified type (e.g. MyClass.DoSomething() rather than MyNamespace.MyClass.DoSomething()), then it is assumed to be in the current namespace. How then do you qualify the type to say it is in the global/empty namespace?
This code sample (console app) should illustrate its behaviour: