ReSharper 2018.1 Help

Members Generation

ReSharper | Options | Code Editing | Members Generation

This page of ReSharper options allows you to adjust code generation settings. For more information, see Code Generation.

ItemDescription
Generated member default body style This setting allows you to choose what ReSharper will include in the bodies of generated members.
  • Throw new NotImplementedException()
    When this option is selected, ReSharper throws NotImplementedException() in bodies of generated members.
  • Return default value
    When this option is selected, ReSharper creates default value return statement in generated members, according to the return type.
  • Uncompilable code
    When this option is selected, ReSharper fills bodies in generated members with symbols that prevent compilation, forcing you to provide a meaningful implementation.
Generated property style This setting defines how properties are generated for implementing and overriding members
  • Automatic property
  • Property with backing field
  • Accessors with default body
    The default body is generated depending on the Generated member default body style setting described above.
Generated documentation This setting defines how XML comments are generated for implementing and overriding members
  • None - no XML comments will be added to generated members.
  • Add <inheritdoc/> for overridden members — this tag is a good alternative to copying documentation from base members. Although the tag is non-standard, it is understood by tools such as NDoc, Sandcastle, and Stylecop.
  • Copy XML documentation from overridden members — this option allows copying XML doc comments from the overridden members to the generated overriding/implementing members.
Other options
Place lacking field above property When ReSharper generates property for a field, a new property with a backing field, or transforms an auto-property to a property with a backing field, the field will be always placed above the property.
Wrap generated members in regions Groups overriding and implemented members within regions with names describing the generated content, e.g. Overrides of [name of base class] and Implementation of [name of base interface].
Annotate property accessors with [DebuggerStepThrough] When selected, adds the DebuggerStepThrough attribute to getters and setters of generated properties to prevent debugger from stepping into the property accessors.
Last modified: 20 August 2018

See Also