(@tomhollander 在 Twitter 上提问)
如果所需的 app/web.config 配置设置不存在,最适合抛出的异常是什么?
最佳答案
System.Configuration.ConfigurationException
根据MSDN(我添加的重点):
The ConfigurationException exception is thrown if the application attempts to read or write data to the configuration file but is unsuccessful. Some possible reasons for this can include malformed XML in the configuration file, file permission issues, and configuration properties with values that are not valid.
关于.net - 如果所需的 app/web.config 配置设置不存在,最适合抛出的异常是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/770506/