You can quickly generate different type members with ReSharper. To view the list of available code generation options for the current type, choose ReSharper | Edit | Generate Code on the main menu or press Alt+Insert.
Specifically, ReSharper helps you:
- Generate type constructors
- Generate properties
- Implement and override members
- Generate delegating members
- Generate partial members
- Generate equality members (Equals() and GetHashCode() methods)
- Generate equality comparer class for your type
- Generate formatting members (ToString() methods)
However, ReSharper's code generation features are more than that - you can use undeclared code symbols, and ReSharper will help declare them with a quick-fix. See Generating Code from Usage for details.
If the Code Analysis is enabled for the current file,
ReSharper detects potentially missing members and proposes the corresponding
Quick-Fixes. For example, for
implementing missing members:
You can control how new members are generated in two major ways:
- Configure a custom Naming Style for different members. When there's a naming style in place, ReSharper enforces its requirements when generating new members.
- Choose default body content for generated members. One of the three options - NotImplementedException(), returning default value, and non-compilable code - can be configured in the Members Generation Options.
ReSharper templates and structural search and replace patterns provided by ReSharper,are other possibilities of generating code.
Note
Code generation features described in this section apply mostly to C# and VB.NET. However, ReSharper provides more code generation options for other languages, for example, Code Generation and Templates. To learn more, consult the corresponding subsections of the ReSharper by Language section.

