To access the Extract Method Refactor operation, you first must select a portion of code to refactor. You then invoke the light-bulb menu either through a right-click or the keyboard shortcut (Ctrl+.).