JetBrains Rider
 
Get JetBrains Rider
Get your hands on the new features ahead of the release by joining the Early Access Program for Rider 2025.1! Learn more

Code generation

Last modified: 11 February 2024

JetBrains Rider 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, JetBrains Rider detects missing members and suggests the corresponding quick-fixes for implementing missing members:

Code Generation command in the action list

More ways to generate code are also available with Context actions and code templates.

In this section:

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

  • Configure various aspects of code style (for example, naming style, formatting rules) JetBrains Rider will enforce its requirements when generating code.

  • Depending on your settings, stubs for new members can be generated in different ways. For example, they can throw new NotImplementedException(), return default value, or include code that will not compile. You can configure these and other preferences on the Editor | Members Generation page of JetBrains Rider settings CtrlAlt0S.