动作委托可以指向具有返回类型的方法吗?例如
Action a = () => Add(); int Add() { return 5 + 6; }
上面的代码编译.现在如果我写上面的东西就像
Action a = new Action(Add);
这不编译.有谁能帮助我理解这背后的逻辑?
.net c# delegates
.net ×1
c# ×1
delegates ×1