using System;
using System.Text.RegularExpressions;
namespace program
{
class wangjun
{
public void show(string s1)
{
Console.WriteLine(s1);
}
//定义委托类型
public delegate void deshow(string s);
static void Main(string[] args)
{
wangjun wj = new wangjun();
//委托wj实例的show方法
deshow dd = new deshow(wj.show);
//执行委托后的方法
dd("123");
}
}
}