Generating Formatting Members
Alt+Insert | Formatting Members
Any type in .NET implements the
method, which returns a string representation of the object of that type.
To return a meaningful string for our types, we often need to override the
ReSharper allows you to automate this routine with the Generate formatting members command.
In the example below, this command is used to generate the
method based on
|Before generation||After generation|
To create formatting members for your type
- In the editor, set the caret within a class.
- Press Alt+Insert or choose in the main menu .
- In the Generate pop-up menu, select Formatting Members.
dialog box that appears, select fields and/or auto-properties to be used in the
to complete the wizard.
You can also click Options to review or modify commmon code generation preferences on the Code Editing | Members Generation page of ReSharper options
You can also generate the override by choosing
menu, but in this case the override will return
This feature is supported in the following languages/technologies:
The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by Language section.