views:

779

answers:

1

Anyone know how to automatically create a delegate stub method?

In WPF it seems im constantly having to pass delegates around. i would like to be able to type a method name that doesnt exist and have a method stub automatically generated...currently i'am having to constantly reference the docs to get the delegate signature and then manually create method with matching signature.

+3  A: 

Use an IDE plugin like Refactor Pro! It also allows you to convert your delegates to instance methods, or if its a one-liner, into a lambda. I tend to start typing using a lambda and then hovering my cursor over the parms gives you the types available.

Or. Wait till Visual Studio 10 which would have this all built in. But until then use either of the aforementioned :)

vanslly
CodeRush XPress is also worth a look - especially for free :-)
Steven Robbins
Oh yeah! I'm just hooked on the Dev Express tools.
vanslly
I forgot about coderush Xpress! I installed the trial of Resharper, and it does generate a stub for me, but i was really looking for something thats free. I already own resharper v2, and dont feel like dropping the $$ on a new version. Though i must say, v4 seems to run way faster.