Identifiers starting with an integer

I have a .net dll, and when I add it to the links, it goes without any problems. The problem is that his namespaces start with an integer, for example. 3gppsa5.org.AlarmIRPSystem , and when I try to use or import it, intelliSense does not allow and the identifier is expected .

I do not have the source of this library, so I can not change it. I know that it is compiled, and the Object Browser correctly displays all its classes and functions. However, I cannot use it in my code. Is there any way to use it in VB.NET.

I tried using Reflection but found a lot of problems. I want to declare a variable something like:

Dim MyIRP As 3gppsa5.org.AlarmIRPSystem.AlarmIRP

Is there any way to achieve this without using reflection and full intellisense support.

Thank.

+3
source share
2 answers

Not really. This identifier is not CLS compliant. Non-CLS compatible identifiers are not guaranteed to be used in other .NET languages.

+3
source

Personally, I would really doubt such as assembly ... the use of such a poor choice of namespace does not reflect well on the design decisions of the developer. I suggest you either find an alternative, or contact the developer / vendor for a more reasonable namespace.

+1
source

Source: https://habr.com/ru/post/1787435/


All Articles