C#中的委托例子,备查
2008-05-10 12:26 OntheMars 阅读(170) 评论(0) 收藏 举报
using System;
using System.Collections.Generic;
using System.Text;
namespace delegateExp1
{
class Program
{
delegate void SimpleDelegate();
static void F()
{
System.Console.WriteLine("hello world");
}
static void MultiCall(SimpleDelegate d, int count)
{
for (int i = 0; i < count; i++)
d();
}


static void Main(string[] args)
{
//SimpleDelegate d = new SimpleDelegate(F);//将方法压入
//d();//委托调用
//F();//

}
}
}

浙公网安备 33010602011771号