![]() Static void Main() => global::System.Console. Without the global alias, the user-defined System namespace, which is a member of the M圜ompany.MyProduct namespace, would be accessed: namespace M圜 NET System namespace, which is a member of the global namespace. The following example uses the global alias to access the. When used with the :: qualifier, the global alias always references the global namespace, even if there is the user-defined global namespace alias. ![]() The global namespace is the namespace that contains namespaces and types that are not declared inside a named namespace. ![]() The global alias, which is the global namespace alias. Public static forwpf::Point Convert(forwinforms::Point point) => new forwpf::Point(point.X, point.Y) When multiple namespaces are defined within a single file, placing using directives within. ![]() Placing using-alias directives within the namespace eliminates compiler confusion between conflicting types. The left-hand identifier can be any of the following aliases:Ī namespace alias created with a using alias directive: using forwinforms = System.Drawing There are subtle differences between placing using directives within a namespace element, rather than outside of the namespace, including: 1. You can use the :: qualifier only between two identifiers. Use the namespace alias qualifier :: to access a member of an aliased namespace. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |