To introduce a variable
  1. Select an expression in the editor.
  2. Do one of the following:
    • Choose ReSharper | Refactor | Introduce Variable on the main menu.
    • Press Ctrl+Alt+V.
    • Press Ctrl+Shift+R and select Introduce Variable in the Refactor This context menu:
      Introduce Variable refactoring
      Image 1:
  3. If your selected expression occurs multiple times in the local context, choose whether ReSharper should apply the refactoring to a single occurrence, or to all occurrences:
    Introduce Variable refactoring
    Image 2:
    If the selected expression occurs only once, proceed to the next step.
  4. In the drop-down list that displays, choose whether the new variable should be implicitly or explicitly typed:
    Introduce Variable refactoring
    Image 3:
  5. Press Tab to display another drop-down list that suggests names for the new variable. Choose a suggestion or type another name:
    Introduce Variable refactoring
    Image 4:
  6. Press Tab once again. ReSharper will introduce a new variable and modify all referencing code accordingly.