OpenMappedExeConfiguration与OpenExeConfigurationOpenMappedExeConfiguration、OpenExeConfiguration

2023-09-02 02:08:07 作者:猪肉涨价了,你也值钱了

OpenExeConfiguration有2重载:

OpenExeConfiguration has 2 overloads:

ConfigurationManager.OpenExeConfiguration (ConfigurationUserLevel) -----(1) ConfigurationManager.OpenExeConfiguration (字符串) -----(2) ConfigurationManager.OpenExeConfiguration (ConfigurationUserLevel) ----- (1) ConfigurationManager.OpenExeConfiguration (String) ----- (2)

OpenMappedExeConfiguration只有1原型:

OpenMappedExeConfiguration has only 1 prototype:

OpenMappedExeConfiguration (ExeConfigurationFileMap fileMap,ConfigurationUserLevel用户级) -----(3) OpenMappedExeConfiguration (ExeConfigurationFileMap fileMap,ConfigurationUserLevel userLevel) ----- (3)

有似乎两者(2)和(3)可以被用于打开一个特定的配置文件,而不是默认app.config文件

It seems both (2) and (3) can be used to open a specific config file rather than the default app.config file.

那么,什么是它们之间的区别是什么?当要使用哪个?

So what's the difference between them? When to use which?

为什么我们单独的的UserLevel 和配置文件位置的(1)和(2),但结合他们在(3)?

Why do we seperate the UserLevel and Config File Location in (1) and (2), but combine them in (3)?

感谢您的任何答复。

我知道,微软总是喜欢做的事情在多个方面。但它应该这样做是有原因的。任何机构知道我的问题的原因是什么?我们是否需要一个赏金;?)

I know that Microsoft always like to do things in more than one ways. But it should do it for a reason. Any body know the reason in my question? Do we need a bounty ;) ?

推荐答案

的差额,最终的.NET配置资源的解释 - 的

相关推荐