- 博客(19)
- 资源 (9)
- 收藏
- 关注
原创 c#多线程Semaphore类旗语锁定
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading ;using System.Diagnostics ;namespace 多线程{ class Semaphore旗语锁定 {
2009-01-31 13:46:00 3495
原创 C#多线程Mutex互斥类小例
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading ;namespace 多线程{ class Mutex互斥类 { public static void Main()
2009-01-28 13:28:00 1941
原创 C#中使用Monitor类、Lock和Mutex类来同步多线程的执行
#中使用Monitor类、Lock和Mutex类来同步多线程的执行 在多线程中,为了使数据保持一致性必须要对数据或是访问数据的函数加锁,在数据库中这是很常见的,但是在程序中由于大部分都是单线程的程序,所以没有加锁的必要,但是在多线程中,为了保持数据的同步,一定要加锁,好在Framework中已经为我们提供了三个加锁的机制,分别是Monitor类、Lock关键字和Mutex类。
2009-01-27 13:27:00 1721
原创 C# 多线程Interlocked类保证原子操作
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading ;namespace 多线程{ class 简单语句原子化 { public static void Main()
2009-01-27 00:36:00 11295 2
原创 C#多线程同步属性操作
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading ;namespace 多线程{ class 线程元子性 { private static Person per = new
2009-01-26 22:23:00 2540
原创 C#线程同步模式
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace 多线程{ class 同步模式 { public static void Main()
2009-01-26 17:35:00 1176 1
原创 C#多线程的死锁演示
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics ;using System.Threading ;namespace 多线程{ class 死锁问题 { publi
2009-01-20 00:23:00 2780
原创 C#多线程的竞态问题解决
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.Threading;namespace 多线程{ class 竞态问题解决 { publi
2009-01-19 23:56:00 1148
原创 C#多线程的竞态问题演示
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics ;using System.Threading ;namespace 多线程{ class 竞态问题演示 { pub
2009-01-19 23:46:00 1054
原创 C#异步回调
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace 多线程{ class 异步回调 { public delegate int TakesAwhileDel
2009-01-19 08:33:00 1258
原创 C#线程池的使用
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading ;namespace 多线程{ class 线程池 { public static void Main()
2009-01-19 08:33:00 850
原创 C#多线程传送数据
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace 多线程{ class 线程传数据 { public static void Main()
2009-01-19 08:32:00 1665
原创 C#等待句柄实现异步
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace 多线程{ class 等待句柄 { public delegate int TakesAwhileDel
2009-01-19 08:30:00 1475
原创 C#异步委托
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading ;namespace 多线程{ class Program { public delegate int TakesAwhil
2009-01-18 00:37:00 712
原创 C#中的跟踪用法
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics ;using System.IO ;namespace 跟踪{ class Program { static voi
2009-01-17 15:29:00 4209
转载 C# Release和debug模式下调试跟踪程序的原则和方法
取相对路径:AppDomain.CurrentDomain.BaseDirectory入门简介 VS.Net 提供了两种机制来帮助开发人员诊断和纠正程序中的错误.一个是debug类, 另一个是trace类.这两个类都有了一个assert函数. Assert在很多情况下可以用来检验变量,比如检验一个指针在调用了某一个系统的API之后是不是为空。即使是使用try-catch块,我们也要面对下面两种
2009-01-16 18:02:00 4615 1
原创 C#动态加载创建程序集
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.CodeDom.Compiler ;using Microsoft.CSharp ;using System.Reflection ;using System.IO ;nam
2009-01-09 12:39:00 1612
转载 C#中Attribute的应用
Attribute的基本概念 经常有朋友问,Attribute是什么?它有什么用?好像没有这个东东程序也能运行。实际上在.Net中,Attribute是一个非常重要的组成部分,为了帮助大家理解和掌握Attribute,以及它的使用方法,特地收集了几个Attribute使用的例子,提供给大家参考。 在具体的演示之前,我想先大致介绍一下Attribute。我们知道在类的成员中有property成员
2009-01-05 23:20:00 14640 3
原创 C#反射小例
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection ;using Com.Zhao.Des.VectorClass ;using Com.Zhao.Attr.WathsNewAttributes ;
2009-01-05 22:54:00 1077
C#中用SOCKET发送HTTP请求小例
2008-12-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人