Archive

Posts Tagged ‘Lambdas’

Code Issues for anonymous methods and lambda expressions

October 31st, 2011 Comments off

We already reviewed the refactorings for anonymous methods and lambda expressions and know how to deal with these language structures. Now its time to review what Code Issues for anonymous methods and lambda expressions CodeRush Pro provides.

Read more…

Refactorings for anonymous methods and lambda expressions

September 27th, 2011 Comments off

An anonymous method is a method without a name – which is why it is called anonymous. You don’t declare anonymous methods like regular methods. Instead, they get declared right inside a member as an inline code block. This is one of the greatest benefits of an anonymous method – it removes the requirement to create a named method elsewhere in the code, especially for simple operations. For example, you are able to pass an inline anonymous method as a delegate parameter, which means that you can use anonymous methods anywhere a delegate type is expected:

Refactor! Anonymous method sample code

Read more…