Namespace Question?

  • Thread starter Thread starter Wole Ogunremi
  • Start date Start date
W

Wole Ogunremi

Sorry if this is a bit elementary...

If a namespace contains another namespace, and a class with the same names
how can one differentiate them?
Eg

Namespace foo
Class doSomething
........
End Class
Class classOne
........
End Class
Class classTwo
........
End Class
Namespace doSomething
Class anotherClass
...
End Class
Class anotherClassTwo
...
End Class
End Namespace
End Namespace

If one wanted to import foo.doSomething visualstudio automatically loads the
class instead of the namespace.
How would one go about directing it to import the namespace instead of the
class?

ps: I am working with packages that I have no control over.

Thanks
Wole
 
hmmm.... I hope I understand the quesiton. Try assigning each Namespace it's
own Alias name like below:

Imports foo = foo

Imports DoSomething = doSomething

Now you can reference the Alias name and know that you are getting the
correct method with in a given Assembly and class. Hope this helps.

David
 
Back
Top