原创  .NET 2.0中,使用ConfigureManager读写配置文件 收藏

 在.NET 2.0中,使用了新的ConfigurationManager类进行配置文件的操作,使用方法如下:

先要在引用中添加一个System.Configuration的dll文件才可以在项目中调用该类。

如果在VS.NET 2005使用.NET 1.1版本中的ConfigurationSettings,则编译器会提示:

'System.Configuration.ConfigurationSettings.AppSettings' is obsolete:'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings'

这表明VS.NET 2005已将ConfigurationSettings视为过时的方法了。

发表于 @ 2007年10月30日 11:04:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:三十岁以前不必在乎的29件事 | 新一篇:C#中为XML节点添加属性(转)

  • 发表评论
  • 评论内容:
  •  
Copyright © eleve
Powered by CSDN Blog