ReSharper 8.0 Web Help

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:


To bind any code generation command to its own shortcut, go to Tools | Options | Environment | Keyboard and look for commands starting with ReSharper_Generate.

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:
Code Generation command in the action list

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.


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, Generate content for placeholders. To learn more, consult the corresponding subsections of the ReSharper by Language section.