Import Symbol Completion (formerly known as Type Name Completion) displays all types that match a given prefix regardless of what namespace they belong to (as opposed to Basic Completion, which only completes names of currently visible types). Import Symbol Completion automatically inserts appropriate namespace import directives to the current file if a selected type has not been imported previously. It also works after dot with extension methods and puts necessary using directives.
- Place the caret at an appropriate position to insert a type name.
- Specify a type name prefix.
- Press Ctrl+Alt+SpaceShift+Alt+Space.
NoteThe Use CamelHumps check box on the Editor page of the Options dialog box doesn't have any impact on how CamelHumps works in completion.
Since ReSharper 8.0 import completion items are included in basic completion list. In other words, there is no need to press the keyboard shortcuts. All appropriate types are displayed in basic completion list by default. If you want to change the default behavior, see Configuring Code Completion.
You can use the following examples to get an idea of how Import Symbol Completion looks like in various scenarios:
- Import Symbol Completion in C#
- Import Symbol Completion in C# with extension methods
- Import Symbol Completion in C# using CamelHumps