場景 想要在程式中獲取App.config中設置的內容。 想要通過 ConfigurationManager.AppSettings[key]; 來進行獲取,已經添加 using System.Configuration; 但是還是提示“當前上下文中不存在名稱ConfigurationManager ...
場景
想要在程式中獲取App.config中設置的內容。
想要通過
ConfigurationManager.AppSettings[key];
來進行獲取,已經添加
using System.Configuration;
但是還是提示“當前上下文中不存在名稱ConfigurationManager”
實現
除了添加using System.Configuration;
還要重新添加引用
右擊引用--添加--System.Configuration