以整数开头的标识符
我有一个 .net dll,当我将其添加到引用中时,它没有任何问题。问题是它的命名空间以整数开头,例如3gppsa5.org.AlarmIRPSystem,当我尝试使用或导入它时,intelliSense不允许并显示需要标识符 。
我没有这个库的来源,所以我无法更改它。我知道它已编译并且对象浏览器正确显示了它的所有类和函数。但是,我无法在我的代码中使用它。有没有办法在VB .NET中使用它
我尝试过使用Reflection,但发现了很多问题。我想声明类似的变量;
Dim MyIRP As 3gppsa5.org.AlarmIRPSystem.AlarmIRP
有没有办法在不使用反射和完整的智能感知支持的情况下实现这一目标。
谢谢。
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 Reflection, 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
就我个人而言,我真的对程序集之类的东西持怀疑态度......使用如此糟糕的命名空间选择并不能很好地反映开发人员的设计决策。我建议您要么找到替代方案,要么与开发人员/供应商联系,寻求更合理的命名空间。
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.
并不真地。此标识符不符合 CLS。不保证不符合 CLS 的标识符可以在其他 .NET 语言中使用。
Not really. This identifier is not CLS compliant. Non-CLS compliant identifiers are not guaranteed to be usable in other .NET languages.