01 2011 档案

摘要:just look belowModel.Person类如下: 阅读全文
posted @ 2011-01-20 22:46 cnbwang 阅读(219) 评论(0) 推荐(0)
摘要:通常,对于一个集合的操作会封装多个逻辑如果将这些逻辑全部写在一个循环里面,那么逻辑本身的可重用性就大打折扣。如果讲每个逻辑都单独写个循环,那么程序的性能就会收到影响。那么该如何做呢?幸好有延迟执行(deffered execution model)模型。代码如下。[代码] 阅读全文
posted @ 2011-01-02 13:38 cnbwang 阅读(219) 评论(0) 推荐(0)
摘要:问题产生和现象:垮线程调用控件属性,现象如下:解决方法:方法1[代码]方法2[代码]通用起见,可以考虑这样做:[代码]备注:Control.InvokeRequired PropertyUsageGets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on.Property 阅读全文
posted @ 2011-01-01 10:52 cnbwang 阅读(2880) 评论(1) 推荐(1)