ReSharper Web Help

This feature is only available in: ReSharper Full Edition and ReSharper C# Edition

Symbol Code Completion (previously known as Basic Code Completion) completes names of classes, methods, variables, keywords, and any other symbols that are available within the current visibility scope (including extension methods that were previously imported).

To invoke Symbol Code Completion
  1. Place the caret at the position where you're going to type your code.
  2. Press Ctrl+Space.

 Tip

To make sure that CamelHumps works with Code Completion, clear the Case-sensitive prefix matching check box in ReSharper | Options | Environment | IntelliSense | Completion Behavior. Note that the Use CamelHumps check box in ReSharper | Options | Environment | Editor doesn't have any impact on how CamelHumps works in completion.

You can use the following examples to get an idea of how Symbol Code Completion works with various code items:

Suggesting Type-Based Variable Names

Commonly used names for fields and variables are suggested depending on their type. After entering the type of a variable, press Ctrl+Space. The look-up list displays the suggested names:
ReSharper symbol code completion
If you enter a variable name prefix, ReSharper will append it to each suggested name:
ReSharper symbol code completion
You can specify a common prefix and/or a common suffix for all new variable names in Options | Languages | Common | Naming Style. If you do that, completion items will be modified accordingly:
ReSharper symbol code completion

Suggesting Members of a Class

ReSharper symbol code completion

Suggesting Visible Types

ReSharper symbol code completion

Suggesting C# Keywords

ReSharper symbol code completion

Suggesting "this" Keyword for Static Methods in Static Classes

ReSharper symbol code completion

Completion for Enum Members

Enum Members
Enum Members

Symbol Completion Using CamelHumps

ReSharper symbol code completion

Completion for Unresolved Symbols

Early used names of data types and their members are suggested, even if they are not declared anywhere in the code and cannot be resolved.
Coding_Assistance__Code_Completion__Symbol__unresolved.png

Suggesting Attributes in Build Scripts

Suppose that you started to type the target build script node the code editor:
Symbol code completion in build scripts

  • Press Ctrl+Space or select ReSharper | Edit | Complete Symbol. The following drop-down list appears:
    Symbol code completion in build scripts
  • Choose the appropriate keyword from the list and press Enter:
    Symbol code completion in build scripts
    The new position of the caret allows you to easily specify the property name.

Completing Names of Symbols in Build Scripts

Suppose that you started typing a path:
Symbol code completion in build scripts

  • Press Ctrl+Space or select ReSharper | Edit | Complete Symbol. The following drop-down list displays:
    Symbol code completion in build scripts
    The list includes all symbols visible in the current scope.
  • You can pick an item from the list right away or continue typing to narrow down the choices:
    Symbol code completion in build scripts
  • To choose an item from the list, press Enter:
    Symbol code completion in build scripts

See Also

Procedures

External Links