为什么在我的System.Configuration命名空间里找不到ConfigurationManager我是2005,2.0框架,
是不是这个东东只能在ASP.NET(C#)中有,
在C#应用程序中就没有呢?

解决方案 »

  1.   

    需要现在工程里添加对system.configuration.dll 的引用
      

  2.   

    环境相同,我的有。
    是不是你没有引用System.Configuration啊?
      

  3.   

    ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.chs/cpref4/html/N_System_Configuration.htm
      

  4.   

    需要现在工程里添加对system.configuration.dll   的引用  正解!
      

  5.   

    " 需要现在工程里添加对system.configuration.dll "
    确实如此;在此谢了啊!
    但我继续使用就出错了呢
    “MessageBox.Show(ConfigurationManager.AppSettings["ConnectionString"].ToString());”
    提示“未将对象引用设置到对象实例”,连接都已建立,数据集都返回值了;之后才用到这条语句,反而提示错误;?
      

  6.   

    string tempStr = ConfigurationManager.AppSettings[ "ConnectionString "].ToString();
    MessageBox.Show(tempStr);在程序里定义个全局变量