如何将方法作为参数传递? 我在Javascript中经常这样做,并需要使用匿名方法来传递参数。 在C#中该怎么做?
protected void MyMethod(){
RunMethod(ParamMethod("World"));
}
protected void RunMethod(ArgMethod){
MessageBox.Show(ArgMethod());
}
protected String ParamMethod(String sWho){
return "Hello " + sWho;
}