ReSharper 2022.3 Help

Double Completion

All of 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 type-matching 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 type-matching completion on the Environment | IntelliSense | Completion Behavior page of ReSharper options (Alt+R, O).

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 not available in C++

Feature is not available in HTML

Feature is available in ASP.NET

Feature is available in Razor

Feature is available in JavaScript

Feature is available in TypeScript

Feature is not available in CSS

Feature is not available in XML

Feature is 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 details specific to other languages, see corresponding topics in the ReSharper by language section.

Last modified: 30 September 2021