I am wondering why I cannot use ternary operator with Func, Action and Predicate.
Here is a simple example that does not compile:
bool condition = true;
Action show = condition ? () => Console.Write("true") : () => Console.Write("false");
It says:
There is no implicit conversion between 'lambda expression' and 'lambda expression'
Also I cannot do an explicit cast:
Action show = (Action)(true ? () => Console.Write("true") : () => Console.Write("false"));