Declare Property with Initializer
Declares a property for the current parameter and initializes it. You can use this code provider for Test-Driven Development. It allows you to create declarations for properties referenced in a code fragment.
Property declared in the interface is automatically added to all its implementers.
Available when the caret is in a method parameter within the method signature.
Place the caret in an undeclared parameter.
Press Ctrl + . or Ctrl + ~ to invoke the Code Actions menu.
Choose Declare Property with Initializer from the menu and press Enter. The red target picker marker appears. It allows you to choose the place where the generated code can be inserted.
Use the Up Arrow and Down Arrow keys to move the target picker.
Press Enter to generate a code in the selected place.
After execution, this code provider adds the auto-implemented property to the current class and assigns the parameter value to it.
The following screencast shows the described steps in action.
You can configure the Target Picker on the Editor | All Languages | Code Actions | Target Picker options page.