//ok
Action<int> CallbackWithParam1 = delegate { };
//error CS1593: Delegate 'System.Action<int>' does not take 0 arguments
Action<int> CallbackWithParam2 = () => { };
Just wondered why the discrepancy really. :-/
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Jared is of course correct. To add a couple more details:
Action<int> c = => {};??? I have no desire whatsoever to make=>into a unary prefix operator.So on the one hand we have the list of pros:
and the cons:
If you were given that list of pros and cons, what would you do? I hope “implement the feature” would not be your choice; it was not ours.