重命名已编译DLL的命名空间 [英] Rename the namespace of compiled DLL

查看:109
本文介绍了重命名已编译DLL的命名空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我有一个dll并访问其中的一个类我需要添加一个引用然后使用某个命名空间。我想在dll中更改类的命名空间。我没有dll的来源只是filename.dll

这可能吗?

Hello,

I have a dll and to access a class inside it I need to add a reference and then use certain namespace. I want to change the namespace of class inside the dll. I don't have the sources of dll just the filename.dll
Is this possible?

推荐答案

请看我对这个问题的评论。要在不同程序集中具有相同的不同类型的完整类型名称时解决罕见问题,有一个鲜为人知的潜意识特征,外部别名。这里解释:

http://msdn.microsoft.com/en -us / library / ms173212.aspx [ ^ ],

http://blogs.msdn.com/b/ansonh/archive/2006/09/28/extern-alias-walkthrough.aspx [ ^ ]。



所有其他可能存在名称冲突的情况都比较容易,而且它们的解决方案太过简单,无法讨论。无论如何,如果你有其他一些特殊问题,请澄清;在任何情况下我都能帮到你。



-SA
Please see my comment to the question. To work around rare problems when you have identical full type names of different types from different assemblies, there is a little known subliminal feature, external alias. It is explained here:
http://msdn.microsoft.com/en-us/library/ms173212.aspx[^],
http://blogs.msdn.com/b/ansonh/archive/2006/09/28/extern-alias-walkthrough.aspx[^].

All other cases of possible name conflicts are much easier and their resolution is way too trivial to discuss. Anyway, if you have some other particular problem, please clarify; I'll be able to help you in all cases.

—SA


这篇关于重命名已编译DLL的命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆