摘要: 前一篇有学习过《把List<T>转换为DataTable》http://www.cnblogs.com/insus/p/8043173.html 那此篇,将是学习反向,把DataTable转换为List<T>。这个方法使用的较多。很多情况之后,从数据读出来的数据是DataSet或是DataTable 阅读全文
posted @ 2017-12-15 23:19 Insus.NET 阅读(841) 评论(1) 推荐(4) 编辑
摘要: 下面这个学习,把List<T>转换为Datatable。 下面先创建一个对象T: class Ay { private int _ID; public int ID { get { return _ID; } set { _ID = value; } } private string _Accoun 阅读全文
posted @ 2017-12-15 16:31 Insus.NET 阅读(6640) 评论(1) 推荐(6) 编辑
摘要: 使用一个小例子来演示:创建一个普通类别: class Ax { private int _ID; public int ID { get { return _ID; } set { _ID = value; } } private string _Name; public string Name { 阅读全文
posted @ 2017-12-15 14:25 Insus.NET 阅读(1179) 评论(3) 推荐(2) 编辑
摘要: 策略模式,即规则在变化之中,结果终归为一。公司给员工计算工资,如有加班费,差旅费,每个月的生活补帖等等其它费用需要计算。这个费的规则是不尽相同。 不管策略的规则怎样,终归需要计算出一个结果 工资:可以定义一个接口: interface IStrategy { double Cost(double b 阅读全文
posted @ 2017-12-15 13:21 Insus.NET 阅读(390) 评论(0) 推荐(3) 编辑