Add method to existing interface

Thread is closed for posting
2 posts, 0 answers
  1. Philippe HERTZOG
    Philippe HERTZOG avatar
    3 posts
    Member since:
    Oct 2012

    Posted 14 Jul 2014 Link to this post


    I'm using JustCode (version 2012...1128.2) with visual studio 2012.

    I have a class that implements an interface. The class and the interface live in different folders and namespaces.

    I now add a new method to the class and would like to add it to the interface. I use the ExtractInterface refactoring and select the new method. But the choices I have is :
    1. create the interface in the class
    2. Create a new file for the interface : but this file is created in the class folder and not in the interface folder.

    Is there a way to add a method to the existing interface from a class that implements it?

  2. Svetlozar
    Svetlozar avatar
    294 posts

    Posted 17 Jul 2014 Link to this post


    Thank you for your feedback!

    Pull Members to Base Type is the refactoring that can add members to an existing interface. Just navigate to the added method and execute Pull Members to Base Type. If the base type (including interfaces) is only one, the member will be added to it. If there is more than one, a dialog will prompt you to which type you wan to pull.

    If you have any other questions, please don't hesitate to write back!


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top