For instance:
Sorter.SortBy ( array, ( a, b ) =>
{
return a > b;
} );
What's the best way to format them for maximum readibility?
Also think of it for one parameter lambda version, and other cases that might be used commonly.
What are the guidelines?
Sorter.Filter(array, a => a.IsOK);
Sorter.SortBy(array, (a, b) => a > b);
Collection.Apply(array, (a) => a * a, // i like lining things up
(x, y, z) => WhipIt(x, y) / z,
(a, b) => a + b);
Evaluator.Confuse(array, (a, func) => // this is a big one, engage curly braces
{
if(a.Flag) return 0;
else
{
var x = func(a);
if(x < 0) return -1;
else return x * 2;
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With