Jon Skeet - http://stackoverflow.com/questions/4317479/func-vs-action-vs-predicatePredicate
is just a special casedFunc<T, bool>
really, introduced before all of theFunc
and most of theAction
delegates came along. I suspect that if we'd already hadFunc
andAction
in their various guises,Predicate
wouldn't have been introduced... although it does impart a certain meaning to the use of the delegate, whereasFunc
andAction
are used for widely disparate purposes.
See example usage in Array.Find<T>:
http://msdn.microsoft.com/en-us/library/bfcke1bz.aspx
No comments:
Post a Comment