ReSharper 8.0 Web Help

Generative Completion helps you effectively and quickly add symbol overrides, partial method bodies and partial classes, implement interface members and generate properties.

To generate overrides and implement members
  1. Start typing the name of an interface member or the name of a member to be overridden.
  2. Press Ctrl+Space or Alt+RightCtrl+Space or Alt+Right.

Consider the example below:

Coding_Assistance__Code_Completion__Generative__generative_completion_01

After you complete the AddItemsGroups method, the whole method body and its signature are inserted.

Coding_Assistance__Code_Completion__Generative__generative_completion_02

To generate partial classes and methods
  1. Place the caret after the partial class keywords.
  2. Press Ctrl+Space or Alt+RightCtrl+Space or Alt+Right.

ReSharper suggests to complete all available partial classes. When you type the declaration of a partial class, you have the necessary information at hand.

Coding_Assistance__Code_Completion__Generative__generative_completion_03

After you complete the Lookup partial class, the name is added.

To generate properties for fields
  1. Start typing the name of the property to be generated.
  2. Press Ctrl+Space or Alt+RightCtrl+Space or Alt+Right.

ReSharper displays available items in the completion list and prompts you to choose whether to generate a read-only or a normal property.

Coding_Assistance__Code_Completion__Generative__generative_completion_04

To generate a constructor for a type
  1. Type ctor in the editor.
  2. Press Ctrl+Space or Alt+RightCtrl+Space or Alt+Right.

Depending on the type and its members, ReSharper suggests different constructors. In the example below, all kind of constructors are available and can be generated.

Coding_Assistance__Code_Completion__Generative__generative_completion_05

Constructors that can be generated:
  • ctorf - a constructor that initializes all fields
  • ctorp - a constructor that initializes all properties
  • ctorfp - a constructor that initializes all fields and properties