0

Let's say that we have 2 different libraries (dll). One of them has only a child namespace child1 under the namespace namespace1 and the other one has the full namespace namespace1. The library with an only the child namespace has a different code from the library with a full namespace. And I need to be sure that my program imports this namespace from the dll 1: which provides only namespace1.child1. How can I select it implicitly?

  • 1
    Thank you, Crono. I will read and understand the previous suggestion, which should solve the issue. Btw, I have 2 dlls "as is" and don't have a possibility to recompile one of them. Till now I only needed the first library, (which is only part of the newer version of the full library) but now I see that I should use some functions from the older one, which I have in full. That's why I need to import blablabla.bla1 (ver2) and blablabla (ver1) to use blablabla(ver1).bla2 – Evdokimov Vladimiros Dec 15 '16 at 19:55
  • 1
    It's not a duplicate because the other question dealt with C#. The syntax is not the identical. One may need to use a C# to VB.net translator to convert. This would not be accepted by C# community if the languages were swapped. – djv Dec 17 '16 at 16:13

1 Answers1

1

Use an alias

Imports ns1 = blablabla.bla1
Imports ns2 = blablabla

Now you can use them like this

ns1.bla2
ns2.bla1.bla2 ' if i understood this correctly

to explicitly refer to each one.

See https://msdn.microsoft.com/en-us/library/7f38zh8x.aspx

djv
  • 15,168
  • 7
  • 48
  • 72