To create an override for
ToString() method
- In the editor, place the caret within a class.
- On the main menu, choose ReSharper | Edit | Generate Code, or press Alt+Insert.
- From the Generate pop-up menu, select Formatting members.
- When the Generate wizard opens, select fields and/or auto-properties to be wrapped with the
ToString()override.
Optionally, select Copy Xml documentation to copy XML documentation for theToString()method. - Click Finish. ReSharper will generate the override returning a format string with selected fields:
Note
You can also generate the override by choosing Overriding Members in the Generate menu, but if you do so, the override will return base.ToString().
