摘要: C#中的线程四(System.Threading.Thread)1.最简单的多线程调用System.Threading.Thread类构造方法接受一个ThreadStart委托,改委托不带参数,无返回值 1 public static void Start1() 2 { 3 Console.WriteLine("this is main thread!:{0},{1}", System.Threading.Thread.CurrentThread.CurrentCulture, Thread.CurrentThread.Name); 4 System.Thread... 阅读全文
posted @ 2014-04-11 10:25 richiezhang 阅读(2770) 评论(0) 推荐(0) 编辑
摘要: C#中的线程三(结合ProgressBar学习Control.BeginInvoke) 本篇继上篇转载的关于Control.BeginInvoke的论述之后,再结合一个实例来说明Cotrol.BeginInvoke的功能 通过前面2篇的学习应该得出以下结论1、Delegate.BeginInvoke中执行的方法是异步的1 public static void Start2()2 {3 Console.WriteLine("main thread:{0},{1},{2}", Thread.CurrentThread.CurrentCulture, Thread.Current 阅读全文
posted @ 2014-04-11 10:16 richiezhang 阅读(2879) 评论(2) 推荐(1) 编辑
摘要: C#中的线程二(Cotrol.BeginInvoke和Control.Invoke)原文地址:http://www.cnblogs.com/whssunboy/archive/2007/06/07/775319.html近日,被Control的Invoke和BeginInvoke搞的头大,就查了些相关的资料,整理如下。感谢这篇文章对我的理解Invoke和BeginInvoke的真正含义。(一)Control的Invoke和BeginInvoke我们要基于以下认识:(1)Control的Invoke和BeginInvoke与Delegate的Invoke和BeginInvoke是不同的。(2)C 阅读全文
posted @ 2014-04-11 10:09 richiezhang 阅读(771) 评论(0) 推荐(0) 编辑
摘要: C#中的线程一(委托中的异步) 一、同步委托 我们平时所用的委托以同步居多,我们编写一个方法和相关委托进行演示: publicdelegatevoid DoSomethingDelegate(string name); //同步委托public static void Start1(){ Console.WriteLine("this is primary thread"); C... 阅读全文
posted @ 2014-04-11 10:05 richiezhang 阅读(1097) 评论(0) 推荐(1) 编辑
摘要: 原文地址: http://nexussharp.wordpress.com/2012/04/21/castle-windsor-avoid-memory-leaks-by-learning-the-underlying-mechanics/ CASTLE WINDSOR: AVOID MEMORY LEAKS BY LEARNING THE UNDERLYING MECHANICS ... 阅读全文
posted @ 2014-03-26 22:07 richiezhang 阅读(1292) 评论(0) 推荐(2) 编辑