class ClassWithDelegate { public delegate int DelegateThatReturnsInt(); public DelegateThatReturnsInt theDelegate; public void Run() { for (; ; ) { Thread.Sleep(500); if (theDelegate != null) {//第一... Read More
posted @ 2010-10-21 21:11
gull
Views(244)
Comments(0)
Diggs(0)
这是一个委托排序的例子public enum Comparsion { theFirstComesFirst=1, theSecondComesFirst=2 } //来决定排序的顺序class Pair<T> //在下面我创建的两个类Student,Dog,都把他们保存在Pair里面{ private T[] thePair = new T[2]; public delegate... Read More
posted @ 2010-10-21 09:28
gull
Views(268)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号