Watch, Follow, &
Connect with Us
Public Report
Report From: C#Builder/IDE/Refactoring    [ Add a report in this area ]  
Report #:  23869   Status: Reported
Extract not only void methods
Project:  C#Builder Build #:  10.0.2151.25345
Version:    10.0 Submitted By:   Oleg Zhukov
Report Type:  Suggestion / Enhancement Request Date Reported:  1/20/2006 4:18:32 AM
Severity:    Commonly encountered problem Last Updated: 1/20/2006 4:22:31 AM
Platform:    All platforms Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
5.00 out of 5
Total Votes: 1
Description
In 'extract method' refactoring make possible to extract not only void methods.
For example we have line of code:

while (currMonthIndex < (startMonth.Year - endMonth.Year)*12 + startMonth.Month - endMonth.Month)

It would be great to extract methods like in 'introduce variable' i.e. get in the end:



while (currMonthIndex < monthsBetween(startMonth, endMonth))

...

int monthsBetween(DateTime month1, DateTime month2)

{


return (month1.Year - month2.Year)*12 + month1.Month - month2.Month)

}

At the moment only void methods are extracted.
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01