卻被編譯器提示說: 警告 1 “System.Configuration.ConfigurationSettings.AppSettings”已過時:“This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings”
於是轉而想找到那個ConfigurationManager類來使用,結果在System.Configuration命名空間下死活找不到ConfigurationManager類, 無奈,求助於網絡,才知道原來還要添加對System.Configuration.dll 文件的引用~~
在所要使用ConfigurationManager的程序集中找到引用接口,點擊程序集,然後找到引用System.Configuration;
第一步打開解決方案資源管理器
第二步右擊引用節點單機添加引用
第三步在程序集中找到system.configuration