动态修改App.Config 和web.Config
摘要:首先假设你的应用程序配置文件如下: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="name" value="old"/> </appSettings> </configuration> Ok,那么如何在运行时去修改name的值呢?? 有很多童鞋会说可以使用Xml读取配置文件,然后xxx。。。。 当然这种方法肯定可以解决问题,有没有其
阅读全文
posted @
2011-08-02 16:19
晴天1848
阅读(244)
推荐(0)
(转)DataTable和List的转换(老外写的)
摘要:publicclassCollectionHelper{privateCollectionHelper(){}publicstaticDataTableConvertTo<T>(IList<T>list){DataTabletable=CreateTable<T>();TypeentityType=typeof(T);PropertyDescriptorCollectionproperties=TypeDescriptor.GetProperties(entityType);foreach(Titeminlist){DataRowrow=table.NewR
阅读全文
posted @
2011-08-02 16:15
晴天1848
阅读(710)
推荐(0)