2011年8月2日
摘要: 首先假设你的应用程序配置文件如下: <?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 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(700) 评论(0) 推荐(0) 编辑