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.


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:

If you enter a variable name prefix, ReSharper will append it to each suggested name:

You can specify a prefix and/or a suffix for all new variable names in Options | Code Editing | C# | C# Naming Style. If you do that, completion items will be modified accordingly:

Suggesting Members of a Class

Suggesting Visible Types

Suggesting C# Keywords

Suggesting "this" Keyword for Static Methods in Static Classes

Completion for Enum Members

Symbol Completion Using CamelHumps

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.

Completion for Argument Names

Suggesting Members of a Dynamic Type

Suggesting Attributes in Build Scripts

Suppose that you started to type the target build script node the code editor:

  • Press Ctrl+Space or select ReSharper | Edit | Complete Symbol. The following drop-down list appears:
  • Choose the appropriate keyword from the list and press Enter:

    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:

  • Press Ctrl+Space or select ReSharper | Edit | Complete Symbol. The following drop-down list displays:

    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:
  • To choose an item from the list, press Enter:

See Also


External Links