Anonymous Method Template / Feature Request

Currently lets say I have a predicate (or action, whatever) -- some anonymous method I want to write on an enabled collection:

List foobars = GetFoobarCollection(); foobars.ForEach( ]]> );

Is there a way to create a template to insert the inline delegate with the appropriate declaration (e.g. "delegate (FooBar fooBar) {$END$}")?

=====
If not, then its a feature request for me, along when maybe you're doing Lambda expressions in 3 / 3.5?

Thanks
Chadwick

3 comments
Comment actions Permalink

Hello Chadwick,

Try smart completion inside parenthesis of ForEach method call. It should
suggest "Create anonymous delegate" as one of its items.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


CP> Currently lets say I have a predicate (or action, whatever) -- some
CP> anonymous method I want to write on an enabled collection:
CP>
CP> List foobars = GetFoobarCollection(); CP> CP> foobars.ForEach( ); CP> CP> Is there a way to create a template to insert the inline delegate CP> with the appropriate declaration (e.g. "delegate (FooBar fooBar) CP> {$END$}")? CP> CP> ===== CP> If not, then its a feature request for me, along when maybe you're CP> doing Lambda expressions in 3 / 3.5? CP> Thanks CP>]]> Chadwick


0
Comment actions Permalink

Awesome Thanks!

0
Comment actions Permalink

Oh wow. Awesome from here too! Thanks.

0

Please sign in to leave a comment.