C# 一些自己需要知道的事情
[ThreadStaticAttribute] static int currId;
double dValue = unchecked( (double)nValue));
Thread.Sleep和Timer性能比较
应该是Thread.Sleep比较好
http://www.cnblogs.com/dataflow/archive/2009/03/11/1408731.html
lambda的一个应用
-
Thread t1 = new Thread(() =>
-
{
-
Thread.Sleep(1000);
-
Thread t = Thread.CurrentThread;
-
Console.WriteLine("Name: " + t.Name);
-
Console.WriteLine("ManagedThreadId: " + t.ManagedThreadId);
-
Console.WriteLine("State: " + t.ThreadState);
-
Console.WriteLine("Priority: " + t.Priority);
-
Console.WriteLine("IsBackground: " + t.IsBackground);
-
Console.WriteLine("IsThreadPoolThread: " + t.IsThreadPoolThread);
-
})
-
{
-
Name = "Thread1",
-
Priority = ThreadPriority.Highest
- };
多线程与并行
http://www.pin5i.com/showtopic-26814.html
那么,我们如何知道线程池中的线程都运行结束了呢,可以想到上文用过的Monitor结构:
界面假死的解决方法:
http://www.pin5i.com/showtopic-26820.html
LINQ 比较自定义的类型,很有用!
并行很好的文章
http://blog.csdn.net/xuzhongxuan/article/details/6288105
关于Task的,还涉及到异常
http://www.cnblogs.com/yanyangtian/archive/2010/06/01/1749199.html
d:/projects/TaskTest 就是里面的一个例子
int[] 的类型是 int[]
父类型是 Array
IsArray
GetElementType 将返回 int