Code is always undergoing change and improvement. Often there is a need to improve the code, for example making it easier to comprehend, without changing the current behavior. This is known as refactoring. Visual Studio refactor tools provide a way to make common code changes and automate the process.
- Writing code is a constant push and pull…on your development skills.…First you write some code and test it to see…if it works the way you intended.…Then, as the project progresses, you discover…ways to improve and change the code.…This kind of rewriting is sometimes called refactoring.…Regardless of how you define it, Visual Studio…has refactoring tools to help you automate the process.…I'll start by showing you the refactoring…menu in Visual Studio.…I am in a C# project at the moment,…and I have the Book class open.…
These are the refactorings that are available for C#,…Rename, Encapsulate Field, Extract Interface,…Remove Parameters, and Reorder Parameters.…If you look at a VB file and go to that same menu,…you'll see it has exactly the same refactorings.…There's also refactorings available for C++ and F#…and there's also limited refactorings for things like…XAML files and renaming controls on Windows forms…and Windows 10 applications.…
I'm going to concentrate on C# today…and on the refactorings in the code window itself.…
- Exploring the code editor window and default settings
- Commenting code
- Using hover tips and IntelliSense
- Tracking changes
- Refactoring code
- Formatting and arranging code
- Navigating and inspecting code
- Using the Task List
- Working with snippets and smart tags
Skill Level Beginner
Q: This course was updated on 08/21/2017. What changed?
A: New videos were added that cover visualizing code and markup with structure guidelines in Visual Studio 2017; refactor enhancements in Visual Studio 2017; format rules for C# in Visual Studio 2017; format rules for Visual Basic in Visual Studio 2017; smart peek options; and CodeMap in Visual Studio 2017.
ASP.NET MVC 5 Essential Trainingwith Michael Sullivan3h 40m Intermediate
1. Work with Code Editors
2. Format Your Code
3. Navigate and Inspect Code
4. Tools for Enhancing Your Coding Sessions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.