I have to do through Action like this:
Action action = () => { ..// };
object o = action;
any way to do this:
object o = () =>{}; //this doesn't compile
I have to do through Action like this:
Action action = () => { ..// };
object o = action;
any way to do this:
object o = () =>{}; //this doesn't compile
What about:
object o = (Action) (() => { ... });
Though I don't really know why you'd want to store it as an object in the first place...
Weeeell, delegates are objects, but lambdas aren't.
This object o = (Action)(() => {});
will compile, but I don't know if it looks any better.