Break Apart/Line Up Parameters/
- 2 minutes to read
Purpose
This Code Formatter is used to collapse the method parameters or arguments into a single line or break them apart.
Availability
Available when the caret is on a method parameter in the method declaration or method argument in its call.
Usage
Break Apart Parameters/Arguments
Follow the following steps to break the method parameters or arguments apart:
Place the caret anywhere on a method parameter in the method declaration or method argument in its call.
Note
The blinking cursor shows the caret’s position at which the Code Formatter is available.
- Press the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions menu.
- Select Break Apart Parameters (Break Apart Arguments) from the menu.
After execution, the Code Formatter removes the line breaks and expands the method parameters to a multiple-line form.
public CommandRegistration(IServiceProvider serviceProvider,
Guid packageGuid,
Guid cmdGroup) {
this.serviceProvider = serviceProvider;
this.packageGuid = packageGuid;
this.cmdGroup = cmdGroup;
}
Note
You can configure the indentation of broken apart parameters and arguments in the Editor | <Language> | Code Actions | Break Apart Settings options page.
Line Up Parameters/Arguments
Follow the following steps to collapse the method parameters or arguments into a single line:
Place the caret anywhere on a method parameter in the method declaration or method argument in its call.
Note
The blinking cursor shows the caret’s position at which the Code Formatter is available.
- Press the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions menu.
- Select Line Up Parameters or Line Up Arguments.
After execution, the Code Formatter removes the line breaks and converts the method parameters into a single-line form.