将方法作为方法的参数
委托在编译的时候确实会编译成类
public delegate void GreetingDelegate(string name);
public void GreetPeople(string name, GreetingDelegate MakeGreeting){
MakeGreeting(name);
}
将方法作为方法的参数
委托在编译的时候确实会编译成类
public delegate void GreetingDelegate(string name);
public void GreetPeople(string name, GreetingDelegate MakeGreeting){
MakeGreeting(name);
}