[英]C#, How to append a namespace to many namespaces across multiple classes
I have a library that seems to conflict with another library that includes some variation of it as well. 我有一个似乎与另一个包含它的一些变体的库冲突的库。 Resulting in some classes having multiple conflicting definitions.
导致某些类具有多个冲突的定义。 How would I resolve this?
我该如何解决?
Is there a way to add a namespace (to an existing namespace) for all the classes in one library to limit its scope, without having to go into each file and manually append it myself. 有没有一种方法可以为一个库中的所有类添加名称空间(到现有名称空间)以限制其范围,而不必进入每个文件并自己手动添加。
假设您要将NewNamespace
添加到CurrentNamespace
,只需在类库项目中为所有类进行“查找和替换”,将namespace CurrentNamespace
替换为namespace CurrentNamespace
namespace NewNamespace.CurrentNamespace
。
in this below link, you can get solution 在下面的链接中,您可以获得解决方案
http://bartdesmet.net/blogs/bart/archive/2006/10/07/4502.aspx http://bartdesmet.net/blogs/bart/archive/2006/10/07/4502.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.