Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

:: Operator (C# Reference)

The namespace alias qualifier operator.

The namespace alias qualifier (::) is used to look up identifiers. It is always placed between two identifiers, as in this example:

global::System.Console.WriteLine("Hello World");

The namespace alias qualifier can be global. This invokes a lookup in the global namespace, rather than an aliased namespace.

For an example of using the :: operator, see the following section:

For more information, see the following sections in the C# Language Specification:

  • 20.9.5 Simple names

  • 25.3 Namespace alias qualifiers

Community Additions

ADD
Show:
© 2015 Microsoft