ReSharper 2024.3 Help

Generate Missing/Overriding Members

For inherited types, ReSharper provides two related code generation features:

  • Implement missing members implements any interface members or abstract members missing from the current class.

  • Override members does the same as Implement missing members, but it also overrides virtual members if applicable.

Normally, you would not need the Implement missing members command because ReSharper highlights types with non-implemented base members as error and lets you generate the missing members with a quick-fix (Alt+Enter):

'Implement members' quick-fix

Implement and/or override members

  1. Place the caret within a class where you would like to implement and/or override members from base types.

  2. Press Alt+Insert or choose ReSharper | Edit | Generate Codeā€¦ from the main menu. Alternatively, you can press Control+Shift+A, start typing the command name in the popup, and then choose it there.

  3. In the Generate popup, select Missing Members / Overriding Members.

  4. In the Generate dialog that appears, select members to implement and/or override:

    Generating overriding members

    The Implement missing members page differs from Override members in two ways:

    • It does not show overridable members (such as members of the Object class in this case).

    • It does not emphasize must-implement members with bold.

  5. Optionally, use the following controls that are applied to all implemented/overridden members at this point (see next step for guidelines on configuring individual members):

    • Implement as lets you choose whether to implement members as:

      • Public members

      • Public virtual members

      • Explicitly implement them as private members

    • Make properties mutable appears if there are get-only properties in the implemented interface. By default, ReSharper will generate get-only implementations. Use this checkbox to add setters to the implementations of get-only properties.

    • Properties as lets you choose whether to implement properties as:

      • Traditional properties with default accessor bodies.

      • Traditional properties that access private fields

      • Automatic properties

  6. Click Finish to complete the wizard.

    You can also click Options to review or modify common code generation preferences on the Code Editing | Members Generation page of ReSharper options.

This feature is supported in the following languages and technologies:

Language: C#

Language: VB.NET

Language: C++

Language: HTML

Language: ASP.NET

Language: Razor

Language: JavaScript

Language: TypeScript

Language: CSS

Language: XML

Language: XAML

Language: Resx

Language: Build Scripts

Language: Protobuf

Language: JSON

Feature is available in C#

Feature is available in Visual Basic

Feature is available in C++

Feature is not available in HTML

Feature is not available in ASP.NET

Feature is not available in Razor

Feature is not available in JavaScript

Feature is available in TypeScript

Feature is not available in CSS

Feature is not available in XML

Feature is not available in XAML

Feature is not available in Resource files

Feature is not available in build script files

Feature is not available in Protobuf

Feature is not available in JSON

The instructions and examples given here address the use of the feature in C#. For more information about other languages, refer to corresponding topics in the Languages and frameworks section.

Last modified: 25 September 2024