有没有办法找出app.config文件是否存在,而不使用"File.Exists"?我试过了
if ( !ConfigurationManager.ConnectionStrings.ElementInformation.IsPresent )
{...}
Run Code Online (Sandbox Code Playgroud)
但即使带有连接字符串的app.config存在,IsPresent也是假的.
编辑:我是否误解了IsPresent属性?
如果用户点击带有KeyUp事件的Windows窗体文本框,则会发出哔哔声或叮当声.我无法确定为什么会发生这种情况以及如何避免这种情况.
任何帮助,将不胜感激.