/Community

A Support Community for SubMain Products
in Search
Welcome to SubMain Community Sign in | Join | Help

Extract "Function"

Last post 09-30-2006, 12:31 AM by Serge B.. 1 replies.
Sort Posts: Previous Next
  •  09-29-2006, 11:41 AM 124

    Extract "Function"

    It would be nice to have "Extract Function/Property" also.

    Extract Method is somehow limited as it creates void method and everything is passed as parameters.

    For example

    class A
    {
    string s = "";

    void test()
    {
    s = MyCompany.MyProduct.some.other.name.space.class.staticMethod(1,2,3,4,5,6);
    }
    }

    And if you want to move that long call to a function with readable name you'd get something like this:

    class A
    {
    string s = "";

    void test()
    {
    s = sTest();
    }

    string sTest()
    {
    return MyCompany.MyProduct.some.other.name.space.class.staticMethod(1,2,3,4,5,6);
    }
    }
  •  09-30-2006, 12:31 AM 125 in reply to 124

    Extract "Function"

    Thank you, Igor. Good suggestion. We actually have this on our enhancement list but it is great to hear confirmation the feature is desired.
    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft VB MVP  |  http://vbcity.com - VB Developer Community
    » » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
View as RSS news feed in XML