KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
So when I write something like this Action action = new Action(()=>_myMessage = "hello"); Refactor Pro! Highlights this as a redundant delegate creation and allows me to to shorten it to Action action = () => _myMessage="hello"; And this usually works great. Usually , but not always. For example, Rhino Mocks has an extension method named Do: IMethodOptions<T> Do(Delegate action); Here, passing in the first version works, but the second doesn't. What exactly is going on under the covers here?
Tags (comma-separated)
Save Edits
Cancel