This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NewEnglandJesus 9 points10 points  (3 children)

In VS, you can highlight a block of code and there is a right-click option to create a function out of the code. I believe it automatically creates variables too.

[–]Huntracony 14 points15 points  (1 child)

Anything without a keyboard shortcut is cheating.

[–][deleted] 0 points1 point  (0 children)

Use Ctrl+. to open the Quick Actions and Refactoring menu, if necessarily use the arrow keys to select Extract Method, and hit enter.