global, ::, huh?
I guess you know the way you can define aliases with the using statement:
Then you can use the shortcut SWF to reference a type in the namespace. In C# 1, the syntax was like this:
Obviously this could be ambiguous, because there could have been any kind of different identifier in scope called SWF. To get rid of this ambiguity, C# 2 introduced the :: qualifier. So now you’ll write the same thing differently:
So, the identifier to the left of the :: qualifier (called the namespace alias qualifier, by the way) defines the namespace that is searched for the identifier to the right of the qualifier. This is where global comes into play: this is an identifier you can use if you want to look only at the global namespace. For example, to make absolutely sure that a reference to a class called String can only ever mean (the framework standard) System.String, you could put something like this:





