ReSharper Help

Code Generation

ReSharper provides a variety of ways to generate boilerplate code. For example, you can use undeclared code symbols and automatically generate these symbols based on usages, generate type members, and more.

If the design-time code inspection is enabled in the current file, ReSharper detects missing members and suggests the corresponding quick-fixes for implementing missing members:

Code Generation command in the action list

A lot of ways to generate code is also provided with Context Actions and Code Templates.

In this section:

You can control how new code is generated in two major ways:

Most of ReSharper's code generation features are available in C# and Visual Basic .NET , some are available in several languages, others are language-specific. The table below lists all code generation features and languages/technologies where they are supported.

The instructions and examples given in the topics within this section address the use of code generation features in C#. For more information on code generation features available for specific languages, see the corresponding topics in the ReSharper by Language section.

Feature C# VB.NET C++ HTML ASPX Razor JavaScript TypeScript CSS XML XAML RESX Build Scripts
Generate Code from Usagefeature_availablefeature_availablefeature_availablefeature_availablefeature_availablefeature_availablefeature_availablefeature_availablefeature_availablefeature_availablefeature_available
Generating Code with Code Completion feature_available feature_available feature_available
Generate Constructorsfeature_availablefeature_availablefeature_availablefeature_available
Generate Properties/(Getters and Setters) feature_available feature_available feature_available
Generate Implementing/Overriding Membersfeature_availablefeature_availablefeature_availablefeature_available
Generate Delegating Members feature_available feature_available
Generate Partial Methods feature_available feature_available
Generate Equality Members feature_available feature_available feature_available
Generate Hash Function feature_available feature_available feature_available
Generate Equality Comparer feature_available feature_available
Generate Formatting Members feature_available feature_available
Generate Event Subscriptions feature_availablefeature_availablefeature_available
Generate Definitions feature_available
Copy and move operations feature_available
Relational operations feature_available
Stream output operator feature_available
Swap function feature_available
Generate Content for Placeholdersfeature_available

See Also

Last modified: 21 September 2015