ReSharper 8.0 Web Help

Code Cleanup is available in Visual Basic as well. Thus you are not supposed to organise your code manually, ReSharper will do that for you!

You can apply Code Cleanup to a selected block of code, to an opened file or to a number of files. To learn how to apply Code Cleanup to a desired scope, see Running Code Cleanup.

Code Cleanup provides two default profiles - Full Cleanup and Reformat Code - you can use one of them or create a custom profile.

Full Cleanup vs Reformat Code

Action Full Cleanup Reformat Code

Optimize 'import' directives

feature_available

feature_not_available

Shorten qualified references

feature_available

feature_not_available

Reformat Code

feature_available

feature_available

ReSharper reformats code according to the settings configured in the following tabs:

  • ReSharper | Options | Code Editing | Visual Basic .NET | Formatting Style | Blank Lines
  • ReSharper | Options | Code Editing | Visual Basic .NET | Formatting Style | Line Breaks and Wrapping
  • ReSharper | Options | Code Editing | Visual Basic .NET | Formatting Style | Spaces
  • ReSharper | Options | Code Editing | Visual Basic .NET | Formatting Style | Other

Consider the example below. Before Code Cleanup:

ReSharper_by_Language__Visual_Basic__Code_Cleanup_01

After:

ReSharper_by_Language__Visual_Basic__Code_Cleanup_02