该类适应读写如下格式的.xml,.config文档 <?xml version="1.0" encoding="utf-8" standalone="no"?> <!--This is a config file ,writer by furenjun--> <configuration> <appSettings> <add key="SqlStr0" value="0"/> <add key="SqlStr1" value="1"/> <add key="2006-7-3 16:05:08" value="1"/> </appSettings> </configuration> using System; using System.Configuration ; using System.Reflection ; using System.Xml; using System.IO; using System.Collections.Specialized; using System.Collections; using System.Data ; using System.Diagnostics; using System.Windows.Forms; namespace 读写配置文件