随笔分类 -  C#

DataSet 转换成List
摘要:public List<T> DataSetToList<T>(DataSet ds, int tableIndext) { //确认参数有效 if (ds == null || ds.Tables.Count <= 0 || tableIndext < 0) { return null; } Da 阅读全文

posted @ 2017-05-24 10:14 Jeff-Lai 阅读(3457) 评论(0) 推荐(0)

C# 反序列化datetime的处理
摘要:Newtonsoft.Json.dll(获取最新版,我使用的是8.0)提供了非常好的Json序列化和反序列化方式,但是对日期的处理却让我纠结了很久。首先定义类如下: 序列化代码如下: 结果是:{"Id":1,"Name":"zhangsan","BirthDay":"2016-08-03T17:23 阅读全文

posted @ 2017-04-22 18:51 Jeff-Lai 阅读(2156) 评论(0) 推荐(0)