ReSharper 2020.2 Help

Double Completion

All ReSharper's completion shortcuts can be pressed several times in succession. In this case, ReSharper adds even more suggestions to the completion list.

The new suggestions are marked with green vertical lines, so you can easily discover them. If necessary, you can turn off this helpers by clearing the Highlight new items checkbox on the Environment | IntelliSense | Completion Appearance page of ReSharper options (Alt+R O).

Double basic completion

When you invoke Basic Completion Control+Space twice, ReSharper adds a number of new suggestions to the completion list.

Non-public members for the current symbol and its base types are added to the completion list.

Double basic completion. Using non-public members

Note that ReSharper still highlights the public member, suggesting to use it because the private member will produce non-compilable code. However, if you decide to use the private member it is very easy to make it public: just press Alt+Enter over the highlighted error and choose Make method public quick-fix.

If you check an object for a compatibility with a derived type, ReSharper adds members of this derived type and all intermediate types in the inheritance hierarchy to the completion list. If you choose one of them, ReSharper will automatically cast the variable to the this type:

Members of derived classes in the ReSharper completion list

You can also cast the sender argument in an event handler to the desired parent control type and access its members.

Casting the 'sender' argument to a desired type using ReSharper's code completion

Double import completion

When you invoke Import Symbol Completion Control+Alt+Space twice, ReSharper adds public types and extension methods from non-references modules to the completion list. ReSharper looks for public types and extension methods in other projects within your solution as well as in all compiled assemblies that are referenced in other projects of your solution. The non-referenced modules are displayed in red:

ReSharper: New items in code completion list

If you choose an item from a non-referenced module ReSharper adds the missing references automatically. By default ReSharper displays a confirmation dialog for each new reference. If necessary, you can disable it by clearing the Show confirmation dialog before adding reference checkbox on the Environment | IntelliSense | Completion Behavior page of ReSharper options.

Double smart completion

When you invoke Smart Completion Control+Shift+Space twice, ReSharper adds call chains that have return values of the expected data type.

Call chains in the ReSharper's completion list
You can press Control+Shift+Space multiple times to extend the list with more complicated call chains. The more times you press, the longer call chains become.

By default, ReSharper takes into account only instance methods and their return values. If necessary, you can also include extension methods to the list of suggestion. To do so, select Show extension methods in double smart completion on the Environment | IntelliSense | Completion Behavior page of ReSharper options.
Note that on large solutions, this can slow down the double completion algorithm.

This feature is supported in the following languages and technologies:

Language: C#Language: VB.NETLanguage: C++Language: HTMLLanguage: ASP.NETLanguage: RazorLanguage: JavaScriptLanguage: TypeScriptLanguage: CSSLanguage: XMLLanguage: XAMLLanguage: ResxLanguage: Build ScriptsLanguage: ProtobufLanguage: JSON
Feature is available in C#Feature is available in Visual Basic .NETFeature is not available in C++Feature is not available in HTMLFeature is available in ASP.NETFeature is available in RazorFeature is available in JavaScriptFeature is available in TypeScriptFeature is not available in CSSFeature is not available in XMLFeature is available in XAMLFeature is not available in Resource filesFeature is not available in build script filesFeature is not available in ProtobufFeature is not available in JSON

The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by Language section.

Last modified: 21 August 2020