The requested page is not available for the requested platform. You are viewing the content for Default platform.

How To Add/Remove Line Breaks To/From Your Code

Follow the steps below to configure the code style for blank lines and apply this style to all the code in your project:

  1. Open CodeRush configuration using the CodeRush | Options menu item.
  2. Open the Editor | C# | Formatting | Blank Lines options page.
  3. Configure the maximum number of blank lines in your code using the Excessive Blank Lines group:


  4. Configure the number of blank lines between different code elements. For instance, you can add line breaks before and/or after the #region directives.


  5. Configure other formatting options to match your code style.
  6. Switch to the Editor | C# | Code Cleanup options page.
  7. Check the Format document item and uncheck any unnecessary items.


  8. Save the configuration using the OK button.
  9. Open a source code file.
  10. Use the Code Cleanup toolbar button to run Code Cleanup.


  11. HowTo_CRLF_11
  12. You can perform Code Cleanup on the entire project using the Cleanup Project item in the project's context menu.