码迷,mamicode.com
首页 >  
搜索关键字:threading    ( 3244个结果
winform访问url传参有返回值
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Net;using System.Text;using System.Threading.Tasks;namesp...
分类:Windows程序   时间:2014-07-29 13:49:18    阅读次数:321
.NET 4新特性--Tuple元组
.NET4定义了8个Tuple类,和一个静态Tuple类---------------------------------------------------------------------返回多个值usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; namespaceConsoleApplication..
分类:Web程序   时间:2014-07-28 16:50:44    阅读次数:233
C#如何判断线程池中所有的线程是否已经完成之Demo
1 start: 2 3 System.Threading.RegisteredWaitHandle rhw = null; 4 new Action(() => 5 { 6 for (var...
分类:编程语言   时间:2014-07-26 17:08:12    阅读次数:311
C# Interlocked类的使用
在C#中,赋值和简单的数字运算都不是原子型操作。在多线程环境下,会产生数据安全的问题。在多线程环境下,我们可以通过使用System.Threading.Interlocked类来实现原子型操作当个数据,使用它比使用Monitor类跟简单。Interlocked类主要方法方法作用CompareExchange()安全比较两..
分类:其他好文   时间:2014-07-26 15:34:55    阅读次数:225
IEnumerable接口
=================================================简单的实现IEnumerable接口------------------------------------Person.csusingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; usingSystem.Collections; na..
分类:其他好文   时间:2014-07-25 11:36:32    阅读次数:200
IEnumerable接口与IEnumerator接口
通过一个例子来看-------------------------------------------------------Student.csusingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; usingSystem.Collections; namespaceConsoleApplication6 { publiccla..
分类:其他好文   时间:2014-07-25 11:36:22    阅读次数:214
linq 读取xml文件
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Linq; namespace linq_to_xml {     internal class Program  ...
分类:其他好文   时间:2014-07-24 12:23:55    阅读次数:186
yield---迭代集合的不同方式
yieldreturn语句返回集合的一个元素yieldbreak可停止迭代------------------------------------------------------------------Student.csusingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; namespaceConsoleA..
分类:其他好文   时间:2014-07-24 10:52:36    阅读次数:204
自制List<T>
-----------------------------------------ListStu.csusingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; usingSystem.Collections; namespaceConsoleApplication3 { publicclassListStu<T> { privateQu..
分类:其他好文   时间:2014-07-24 10:51:54    阅读次数:228
.Net 异步调用
.NET异步编程之新利器——Task与Await、Async一.FrameWork 4.0之前的线程世界 在.NET FrameWork 4.0之前,如果我们使用线程。一般有以下几种方式:使用System.Threading.Thread 类,调用实例方法Start()开启一个新线程,调用...
分类:Web程序   时间:2014-07-23 16:33:41    阅读次数:398
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!