Improving Code Quality: Refactoring

For the first time in the history of Visual Basic .NET, Visual Basic 2015 introduces support for built-in refactoring techniques. Refactoring allows you to reorganize portions of your code a better and cleaner way, without changing its original behavior. Visual Basic 2015 makes it easier to refactor your code via special tools offered by the light bulb. In this section you learn about the most common refactoring techniques.

Extract Interface

Refactoring allows you to extract an interface from a class. Consider Listing 6.7, which shows an extended definition of the Person class discussed above.

Why StringBuilder?

You might argue that the code would be better if it simply used methods from the String class ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.