2011年9月15日
摘要:
For a long time, I don't know how to use IAsyncResult and only know it's a thing has some relations with delegate.After investgation, I understand it, so write some note at here.1. IAsyncResultinterface is under System namespace.We can see its defination as follows:namespace System{ public i
阅读全文
posted @ 2011-09-15 14:31
BobLiu
阅读(470)
推荐(0)
2011年9月14日
摘要:
1. Union(合并)说明:连接不同的集合,自动过滤相同项;延迟。即是将两个集合进行合并操作,过滤相同的项。var q = ( from c in db.Customers select c.Country ).Union( from e in db.Employees select e.Country ); 语句描述:查询顾客和职员所在的国家2.获取的数据集如何遍历foreach (var item in q){Response.write(item.country);}3.linq查询语句和变量本身只是存储查询命令, 实际的查询执行会延迟到在foreach语句中循环访问查询变量时才发生.
阅读全文
posted @ 2011-09-14 18:00
BobLiu
阅读(231)
推荐(0)
2011年9月5日
摘要:
OO的五大原则是指SRP、OCP、LSP、DIP、ISP。 1. SRP(Single Responsibility Principle 单一职责原则) 2. OCP :开闭原则3.LSP——里氏替换原则 4.DIP 依赖倒置原则 5.ISP 接口隔离原则 转贴: OO设计原则总结http://www.cnblogs.com/me-sa/archive/2008/03/31/dp.html
阅读全文
posted @ 2011-09-05 15:53
BobLiu
阅读(215)
推荐(0)
2011年9月2日
摘要:
原帖地址: http://www.cnblogs.com/yukaizhao/archive/2010/06/29/ood-ocp.html开闭原则的意思是软件实体应该对扩展开发,对修改关闭(Software entities should be open for extension,but closed for modification)。实现开闭原则的途径是抽象,将需要扩展的部分抽象出来,并留出扩展接口。打个比方,比如电脑机箱上有usb的插口,这些插口就是可扩展的部分,我们可以在这些usb插口上插上鼠标,键盘,U盘,还可以插上网银的U盾等等。电脑硬件上对于usb接口的这个设计就是一个符合.
阅读全文
posted @ 2011-09-02 16:37
BobLiu
阅读(200)
推荐(0)
2011年8月31日
摘要:
1.委托的本质委托实现了面向对象的,类型安全的方法回调机制。委托看上去就一句话, 很简单, 但在本质上它是一个类,CLR和编译器在后台会将委托自动编译为一个类.该类继承自System.MulticastDelegate类,该类维护一个委托列表,在调用多播委托时,将按照委托列表的委托顺序而调用的。该类包括一个接受两个参数的构造函数和3个重要方法:BeginInvoke、EndInvoke和Invoke。下面是delegate委托的父类MulticastDelegate的部分代码: public abstract class MulticastDelegate : Delegate{ public
阅读全文
posted @ 2011-08-31 17:03
BobLiu
阅读(691)
推荐(1)
2011年8月26日
摘要:
Reading SQL Server's Transaction Loghttp://www.sqlservercentral.com/articles/Transaction+Log/71415/http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=152870如何查看SQL Server的事务日志 .分类: sql server 2005 2011-01-12 13:33 19人阅读 评论(0) 收藏 举报 在SQL Server 7.0和SQL Server2000中,可以用下面的命令查看:DBCC log ( {dbid|dbname
阅读全文
posted @ 2011-08-26 17:57
BobLiu
阅读(2004)
推荐(0)
2011年8月25日
摘要:
SOS调试C:\Windows\Microsoft.NET\Framework\v4.0.30319\SOS.dllhttp://www.rainsts.net/article.asp?id=598方法槽表方法槽表的结构: 最开始是方法槽数、任何类型的开始4个方法总是ToString, Equals, GetHashCode, and Finalize。这些是从System.Object继承的虚方法。然后后面是类型从基类继承的虚方法,接着是自己类型实现的方法,最后是构造方法。方法槽表的主要就够就是:虚方法--实例方法--构造方法,这样的排序。这里要特别主要的是,基类的实例方法和静态方法是不会继
阅读全文
posted @ 2011-08-25 18:03
BobLiu
阅读(306)
推荐(0)
摘要:
当工作流完成, InstanceState中的记录会自动删除, 否则此库会越来越大, 撑爆硬盘.除非工作流出错, 没有走完流程,才会保留在表中。参考帖子:http://bbs.diybl.com/dview2t113623.html
阅读全文
posted @ 2011-08-25 15:45
BobLiu
阅读(217)
推荐(0)
2011年8月20日
摘要:
赖世雄<<突破英语写作关>>笔记文章构成基本形式:1.Introduction(Topic Sentence) 主题句2.Development(Main Body: Supporting Ideas) 发展(主体:支持论点)3.Conclusion Sentence结尾句三种基本的文体1.记叙文(Descriptive writing)2.抒情文(Narrative writing)3.议论文(Argumentative writing) 常犯的问题1.多余的话 Redundancy2.人称一致 Stance3.转折语 Transitional words First
阅读全文
posted @ 2011-08-20 13:31
BobLiu
阅读(559)
推荐(0)
2011年8月15日
摘要:
经常弄混这三个方法, 参考了一堆帖子, 总结如下:一.Load方法1.Load(AssemblyName) 在给定程序集的 AssemblyName 的情况下,加载程序集。例1: TestLib.LzdTest lzdTeset = (TestLib.LzdTest)Assembly.Load("TestLib").CreateInstance("TestLib.LzdTest");用Reflector查看源码如下: public static Assembly Load(AssemblyName assemblyRef){ StackCrawlMark
阅读全文
posted @ 2011-08-15 14:57
BobLiu
阅读(8226)
推荐(2)