by luisabreu via LA.NET [EN] on 1/15/2009 3:15:58 PM
Even though it exists for a long time, there are still some guys which are surprised whenever they see something like this:
global::System.Console.WriteLine( “Hello” );
what is that global:: thing over there? Well, it’s there for saying that search for the System.Console class should start at the global namespace. You’ll need this kind of thing whenever you have types/namespaces that hide the global ones. The documentation on MSDN explains all these concepts really well, so I’ll just redirect you there.
btw, it’s possible that you’ll end up seeing this code generated by tools (if I’m not mistaken, you’ll be seeing it whenever you look at the code generated for the classes that are mapped into tables on the EF framework).
Original Post: Accessing the global namespace
The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.