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:
using System;
namespace MyNamespace
{
public class Program
{
static void Main(string[] args)
{
MessageWriter.Write(); // writes "MyNamespace namespace"
global::MessageWriter.Write(); // writes "Global namespace"
Console.ReadLine();
}
}
// This class is in the namespace "MyNamespace"
public class MessageWriter
{
public static void Write()
{
Console.WriteLine("MyNamespace namespace");
}
}
}
// This class is in the global namespace (i.e. no specified namespace)
public class MessageWriter
{
public static void Write()
{
Console.WriteLine("Global namespace");
}
}