Rory Becker - DevExpress CodeRush Blog

June 2014 - Posts

  • 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.


Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at or call us at +1 (818) 844-3383


DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, Delphi, HTML5 or iOS & Android development. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2018 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners