随笔分类 -  .net

摘要:1.需要 QQWry.Dat IP 地址数据库 2辅助类库 1 1 using System; 2 2 using System.Collections.Generic; 3 3 using System.IO; 4 4 using System.Linq; 5 5 using System.Tex 阅读全文
posted @ 2016-09-22 16:00 苏镡 阅读(881) 评论(0) 推荐(0)
摘要:线程,有时被称为轻量级进程(Lightweight Process,LWP),是程序执行流的最小单元。一个标准的线程由线程ID,当前指令指针(PC),寄存器集合和堆栈组成。另外,线程是进程中的一个 实体,是被系统独立调度和分派的基本单位,线程自己不拥有系统资源,只拥有一点儿在运行中必不可少的资源... 阅读全文
posted @ 2014-04-22 22:53 苏镡 阅读(191) 评论(0) 推荐(0)
摘要:问题:将SqlDataReader对象转换为List集合思路:1,利用反射的特性得到对应实体Model的公共属性 Type type = typeof(T); PropertyInfo[] p = type.GetProperties(); 这样就得到了该实体Model中的属性 2,利用反射创建该类的实例var model = Activator.CreateInstance(); 3,遍历该实体中的所有属性,将该实例插入到集合中 整体代码如下: 1 using System; 2 using System.Collections.Generic; 3 using S... 阅读全文
posted @ 2013-12-05 10:15 苏镡 阅读(680) 评论(0) 推荐(1)