命名命名空间

Bla*_*ell 4 .net c# namespaces

我在试图找出如何恰当地命名我的命名空间时遇到了问题.我的命名空间目前是:

<CompanyName>.<ProductName>.Configuration
Run Code Online (Sandbox Code Playgroud)

但是,使用"配置"与以下内容冲突:

System.Configuration
Run Code Online (Sandbox Code Playgroud)

更糟糕的是,我还有一个名为ConfigurationManager的类.我知道我可以将其更改为:

<CompanyName>.<ProductName>.<ProductName>Configuration
Run Code Online (Sandbox Code Playgroud)

但这似乎是多余的.有任何想法吗?

编辑:此外,我知道在调用任何一个类时,我可以完全限定调用代码,但System.Configuration命名空间和<CompanyName>.<ProductName>.Configuration命名空间中的类将被使用的频率将导致丑陋的代码.

EDIT2:提供细节:

使用陈述:

using System.Configuration;
using SummitConfiguration = SST.Summit.Configuration;
Run Code Online (Sandbox Code Playgroud)

问题行 配置config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal);

错误消息 'SST.Summit.Configuration'是'命名空间',但它像'类型'一样使用(对于上面的问题行)

Ree*_*sey 11

通常,在这种情况下,我会离开Configuration命名空间,并使用别名来访问我的命名空间(而不是完全限定).例如:

using System.Configuration;
using PC = MyCompany.MyProduct.Configuration;

// ...

string configValue = PC.ConfigurationManager.GetValue("Foo");
Run Code Online (Sandbox Code Playgroud)