New CodeRush Plugin - Declare Extension Method

Another new CodeRush plugin!

This time one to help declare extension methods on existing objects.

Introducing Declare Extension Method

This plugin is really simple.

Consider the following code with a call to an undeclared method MyNewMethod.


Place your caret on the call to MyNewMethod and hit your CodeRush Refactor key (Defaults to Ctrl+`)


Choose ‘Declare Extension Method’ from the menu.


CodeRush generates a new static class in the same namespace as your calling code, containing the stub of your new extension method.

The previous syntax error will have disappeared and all that’s left to do, is for you to fill in the implementation of your new method Smile

Where do I get this Awesome Plugin from ?

Declare Extension Method is available from

GitHub: Here you will find the current (and historical) source of the plugin as well as the latest installable version.

The Visual Studio Gallery: Installing from the Visual Studio Gallery allows VS to locate any updates that are shipped after the initial release.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.