Question

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.

Was it helpful?

Solution

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 :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top