开发者

Identifiers starting with an integer

开发者 https://www.devze.com 2023-02-06 15:25 出处:网络
I have a .net dll and when I add it in the references, it goes without any issue. The problem is that its namespaces start with an integer e.g. 3gppsa5.org.AlarmIRPSystem and when I try to use or impo

I have a .net dll and when I add it in the references, it goes without any issue. The problem is that its namespaces start with an integer e.g. 3gppsa5.org.AlarmIRPSystem and when I try to use or import it, the intelliSense doesn't allow and says identifier expected.

I don't have the source of this library so I can't change it. I know it is compiled and the Object Browser is correctly showing all of its classes and functions. However, I am unable to use it in my code. Is there any way to use it in VB .NET

I've tried using Refl开发者_高级运维ection, but found many problems. I want to declare the variable something like;

Dim MyIRP As 3gppsa5.org.AlarmIRPSystem.AlarmIRP

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

Thanks.


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


Personally I would be really dubious of such as an assembly... using such a poor choice of namespace doesn't reflect well on the design decisions of the developer. I suggest you either find an alternative, or get in contact with the developer/vendor and as for a more sensible namespace.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号