的詳細信息1)什麼是行動委託的真正定義?一些定義描述爲:多態條件圖,有人說它*應用決策表*。有關行動委託在C#
(你可能會問,如果我知道它,我可以瞭解它的真正目的,通過了解定義,你將獲得什麼)。
2)感謝Binaryflow的Andrew Hare給出了很好的例子。 當我宣佈
string[] words = "This is as easy as it looks".Split(' ');
`Array.ForEach(words, p => Console.WriteLine(p));`
我能理解它實際上does.But當我宣佈,如何C#解釋時,我 聲明
Dictionary<SomeEnum, Action<User>> methodList =
new Dictionary<SomeEnum, Action<User>>()
methodList.Add(SomeEnum.One, DoSomething);
methodList.Add(SomeEnum.Two, DoSomethingElse);
它存放在字典中操作的集合?。遺憾作爲例子是不完整的,我沒有得到它。
3)Action , Function ,Predicate
delagets之間的功能區別是什麼?
在這裏看到答案http://stackoverflow.com/questions/566860/delegates-predicate-action-func – BlackTigerX