Namespace Alias Qualifier(::) makes the use of alias name in place of longer namespace and it provides a way to avoid ambiguous definitions of the classes. It is always positioned between two identifiers. The qualifier looks like two colons(::) with an alias name and the class name. It can be global. Thus it doesn’t invoke a lookup in the aliased namespace but in the global namespace.
It is the first namespace.
Note: The namespace alias qualifier :: is only used for the namespaces or aliases and cannot be used for subclasses.
System.Collections::lists obj= new System.Collections.lists() // illegal aliasname = System.Collections; aliasname::lists obj = new aliasname::lists(); // Legal
ASCII value of A is: 65 ASCII value of B is: 66
- alias command in Linux with Examples
- jQuery | event.namespace Property
- How to use animation on favicon image ?
- C# | How to use strings in switch statement
- How to use Array.BinarySearch() Method in C# | Set -1
- How to use jQuery to Search and Replace HTML elements?
- What is the use of the @ symbol in PHP?
- C# | How to use multiple catch clause
- How to use a switch case 'or' in PHP?
- How to use a not:first-child selector in CSS?
- C# | How to use Interface References
- How to use Array.BinarySearch() Method in C# | Set -2
- What is the best way to include CSS file? Why use @import?
- What is the use of “=>” symbol in PHP ?
- Use of :even and :odd pseudo-classes with list items in CSS
- When to use static vs instantiated classes in PHP?
- How to use AcceptsReturn Property of TextBox in C#?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.