Join Walt Ritscher for an in-depth discussion in this video Formatting and arranging code layout, part of Visual Studio Essential Training: 05 Code Editors.
- [Instructor] You can spend countless hours…in visual studio working with code,…don't waste time manually moving code around the screen…to get it arranged the way you want.…Instead use the formatting tools available,…in visual studio to automate most of that process.…I'm in this code screen here in this book dot cs file…and if you look at the code on line 17 through line 25,…you'll see that there's something odd about this code.…Nothing's lined up, the int variable on line 20…is not lined up correctly,…there's extra spaces in line 25.…
So I should rearrange this…and make it look nicer.…Of course I can manually do this.…I can go up to line 18…and put an extra space there…and delete the extra spaces…on the other side of the equal sign…but I'll show you how to force visual studio…to reformat this for us…using a set of built in rules.…So before I show you how to do that,…let's talk about the default rules for c sharp.…If you watch one of the other videos in the course…you saw that as I add new lines of code…inside a set curly braces like here on line 29,…
- 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 Intermediate
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.
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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.