I have seen double colons (::) in generated code. I was wondering what its purpose is?
::
It's the namespace alias qualifier operator. Citing from the linked-to MSDN page:
The namespace alias qualifier (::) is used to look up identifiers. It is always positioned between two identifiers, as in this example: global::System.Console.WriteLine("Hello World");
The namespace alias qualifier (::) is used to look up identifiers. It is always positioned between two identifiers, as in this example:
global::System.Console.WriteLine("Hello World");
2.1m questions
2.1m answers
60 comments
57.0k users