It is known that you can assign a lambda that does not return a value to an object Action<T>. What about lambdas that theoretically return value? Like this:
Action<T>
Action<double> result = (x => x + 1);
Will the result be ignored?
Thank!
You're using Func
Func
Func<double, double> result = (x => x + 1);
If you write like this, the result can be ignored. Although this example is not very useful
Action<double> result = x => { x + 1; };