How can I combine two lambda expressions into one using an OR ?
I have tried the following but merging them requires me to pass parameters into the Expressio
Why not just do:
Func func1 = (x) => x > 5; Func func2 = (x) => x > 10; List> funcs = new List> { func1, func2 }; var value = 7; Console.WriteLine(funcs.Any(x => x(value))); // OR Console.WriteLine(funcs.All(x => x(value))); // AND
?
Saves messing about with 3rd party libraries.