← Back to Shortcut Collections
Visual Studio

Visual Studio

Microsoft's most powerful IDE optimized for C# and .NET development, strongly supporting enterprise development

Shortcuts for improving code quality with automatic refactoring features like renaming and method extraction

Ctrl+RCtrl+R
Rename
Renames a symbol.
💡 Hint: Rename × 2
🎯 Safely rename identifiers with Ctrl+R,Ctrl+R to maintain code consistency throughout
Ctrl+RCtrl+M
Extract Method
Extracts selected code into a new method.
💡 Hint: Refactor + Method
🎯 Extract selected code to a method with Ctrl+R,Ctrl+M to create reusable code
Ctrl+RCtrl+E
Encapsulate Field
Encapsulates a field with a property.
💡 Hint: Refactor + Encapsulate
🎯 Encapsulate fields into properties with Ctrl+R,Ctrl+E to enhance access control
Ctrl+RCtrl+I
Extract Interface
Extracts an interface from a class.
💡 Hint: Refactor + Interface
🎯 Extract interfaces with Ctrl+R,Ctrl+I to facilitate dependency injection
Ctrl+KCtrl+D
Format Document
Formats the entire document.
💡 Hint: Key + Document
🎯 Format entire code with Ctrl+K,Ctrl+D for readable and maintainable code
Ctrl+KCtrl+C
Comment Selection
Comments out the selected code.
💡 Hint: Key + Comment
🎯 Comment out selections with Ctrl+K,Ctrl+C for quick temporary code disabling
Ctrl+KCtrl+U
Uncomment Selection
Uncomments the selected code.
💡 Hint: Key + Uncomment
🎯 Uncomment with Ctrl+K,Ctrl+U to quickly restore disabled code