ReSharper Web Help

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:

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 elements of file structure in build scripts

ReSharper provides code completion capabilities for MSBuild and NAnt scripts. It suggests tags, their attributes, properties, item groups and metadata names.

ReSharper distinguishes required elements and adds special icon, so you can easily find them in the completion list. The list includes all symbols visible in the current scope, so pick an item from the list or continue typing to narrow down the scope.

To invoke the completion list in NAnt scripts, press Ctrl+Space or select ReSharper | Edit | Complete Symbol. In MSBuild scripts ReSharper does it for you, automatically.

See Also

Procedures