inherited namespace

  • Thread starter Thread starter Alexander Widera
  • Start date Start date
A

Alexander Widera

hello,
is it possible to completly inherit a namespace?

something like
"MyNewNamespace : MyNameSpaceBase"


i want to access all classes in the MyNameSpaceBase by the namespace
"MyNewNamespace", because some classes are inherited and overridden, and
some are not.

thanks for help,

alex
 
Personally I'd just be doing:

using MyNameSpaceBase;
using MyNewNamespace;

As for the question: not as such; you can (on a file by file basis)
alias the namespace, e.g.
using Fred = System.Collections;

then

Fred.BitArary etc - but this is usually used to resolve conflicts in
individual classes, e.g.

using System.Collections;
using Fred.Collections;
using StandardArrayList = System.Collections.ArrayList;
using SuperArrayList = Fred.Collections.ArrayList;

(i.e. an "ArrayList" class exists in 2 namespaces that we are
importing, and we want to be able to use both in shorthand in the same
file - can also handle explicit assembly versioning, but that is more
complex).

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top