摘要:
All Types Are Derived from System.Object Every object on the heap requires some additional members—called the type object pointer and the sync block index—used by the CLR to manage the object . When ...
阅读全文
posted @ 2010-07-10 20:36
hf
阅读(207)
推荐(0)
摘要:
Two Kinds of Assemblies, Two Kinds of Deployment A strongly named assembly is signed with a publisher’s public/private key pair that uniquely identifies the assembly’s publisher . This key pair allow...
阅读全文
posted @ 2010-07-07 20:01
hf
阅读(249)
推荐(0)
摘要:
本来可以用Thread.Suspend暂停的,但它被弃用了,微软建议用Monitor, Mutex, Event, Semaphore等来做线程同步或保护资源。有时候我们只是想单纯的暂停一个线程,例如一个爬虫程序,很久爬不完暂停下吧(也许没什么用处......),可以用下边的办法。先定义一些线程状态:在Pause方法里改变当前状态:再有一个方法处理状态改变请求:在这个方法里如果状态为TaskSta...
阅读全文
posted @ 2010-07-06 17:54
hf
阅读(1690)
推荐(1)
摘要:
工作中常会遇到同样的代码段,例如操作数据库就有打开连接、执行查询、异常处理、日志等,可能会这样写 返回一个Model 执行查询上边都有类似的逻辑,有没有办法简化呢?我们发现不同的只是try 里的内容,所以可以写这样一个方法:现在第一个就可以这样:第二个:会不会方便一点呢。:)以上DoExecute是有问题的……,这里只是为了演示Func的用法。聪明的您应该可以看出它的问题所在吧!
阅读全文
posted @ 2010-07-06 15:29
hf
阅读(429)
推荐(0)
posted @ 2010-07-06 10:52
hf
阅读(612)
推荐(0)
摘要:
.NET Framework Deployment goals Goals: DLL hell . installation complexities . security. As you’ll see, the .NET Framework enables users to control what gets installed and what runs, and in gene...
阅读全文
posted @ 2010-06-28 19:59
hf
阅读(199)
推荐(0)
摘要:
Compiling Source Code into Managed Modules Decide which programming language to use Microsoft has created several language compilers that target the runtime: C++/CLI, C# , Visual Basic, F# , ... and ...
阅读全文
posted @ 2010-06-25 21:46
hf
阅读(682)
推荐(0)