Archive

Posts Tagged ‘Inlining’

String.Format-specific refactorings shipped in Refactor! Pro

August 31st, 2011 Comments off

Refactor! Pro provides several refactorings to create and organize the .NET String.Format call. The String.Format call is a static method that receives a string that specifies where the following arguments should be inserted, and how they should be formatted. You can specify the display options for each argument individually using the String.Format call.

Read more…

Refactorings – Inline Method

February 17th, 2011 Comments off

The Inline Method refactoring lets you move the method’s body into the body of its callers and remove the method declaration, if needed. Inline Method is helpful when you have a group of methods that seem badly factored. You can inline them all into one big method, and then re-extract the methods.

Another reason to use Inline Method is that sometimes you do come across a method in which the body is as clear as the name. Or, you refactor the body of the code into something that is just as clear as the name. When this happens, you should then get rid of the method.

Read more…