You can use System.IO.File.Exists() method to detect.
If I use System.IO.File.Exists(), I need to get the file name of the configure file myself. However, the ConfigurationManager already knows the configure file. So I think there is a shortcut to do that thing, but I can't find it
I have found the answer: Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.HasFile
是不是根据xml 类检测 什么配置文件存在?
However, the ConfigurationManager already knows the configure file. So I think there is a shortcut to do that thing, but I can't find it
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.HasFile