c++ cli - Using directive to specify class alias in C++/CLI -


in c#, there 3 types of using directives:

using system; // specify namespace using diag = system.diagnostics; // specify namespace alias using dbg = system.diagnostics.debug;  // specify class alias 

in c++/cli, know equivalents first two:

using namespace system; namespace diag = system::diagnostics; 

is there way third 1 in c++/cli?

doing namespace dbg = system::diagnostics::debug; gives error c2879: 'system::diagnostics::debug' : existing namespace can given alternative name namespace alias definition

the alterntive i've come #define dbg system::diagnostics::debug, i'd prefer proper using directive, if available.

a c++ typedef trick here.

typedef system::diagnostics::debug dbg; 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -