ReSharper 2021.2 Help

Language-independent context actions

ReSharper provides the following context actions for common use:

Name

Description

Apply in-place refactoring

Applies in-place refactoring.

For more information, see Inplace refactorings.

Apply in-place refactoring (popup)

Applies in-place refactoring.

Apply smart paste behavior (popup)

Escapes pasted text according to context.

Apply syntax style

Apply syntax style to selection

Apply syntax style

Apply syntax style to selection

Cleanup selection

Provides actions to perform code cleanup on selection

Comment selection

Comments selection.

Edit with Localization Manager

Edit current resource with Localization Manager

For more information, see Localization Manager

Encapsulate field

Encapsulating field to property if there is no existing one

This context action invokes the Encapsulate Field refactoring.

Format code

Format code

When this action is enabled, ReSharper allows you to apply formatting rules in the current selection.

Import types for pasted code

Imports types and extension methods for pasted code fragment

ReSharper: Namespace import fix for pasted code block

This action only appears if all non-imported types in the pasted code block can be unambiguously found in the referenced modules of the current project.

For more information, see Import missing namespaces.

Mark as injected language or reference

Recognize literal expression content as some language or reference

Run configuration from static method

Run configuration from static method.

For more information, see Run configurations

Surround items

Surround items.

When this action is enabled, surround actions and surround templates appear in the action list when you press Alt+Enter over a selected code block:

ReSharper: 'Surround with' context action

Wrap long line

Wrap long line

Last modified: 19 August 2021