7
I am studying WPF and the MVVM model by the following article : https://msdn.microsoft.com/en-us/magazine/dd419663.aspx
In the implementation of the Icommand interface, the author defines the following field:
Predicate<object> _canExecute;
When the class is instantiated the following parameter is passed to that field:
x => canExecute
My question is, why the parameter is passed in lambda expression form?
TL;DR; Because it’s shorter, simpler, easier to read and, after all, more beautiful =).
– Jéf Bueno