Each code editor in Visual Studio has a set of configurable rules that control the formatting of the code. Walt shows the key setting available for the C# editor.
- [Voiceover] In this video,…I'll look at the format rules for the C# Code Editor.…To review the basics of code formatting,…each code editor has a set of rules…that it follows when you invoke…the Format Document command.…Some of these rules are configurable,…and that's what I'm looking at today.…In the C# Editor,…you invoke the Format Document command…by using Edit, Advanced, Format Document,…or this keystroke set, Ctrl-K, Ctrl-D.…This is universal across all of the code editors, really.…
I can invoke it that way, or I can automatically…have it happen here…under certain conditions.…For instance, I can have the format happen…when I press the semi-colon.…If I move down to this line,…and I put some extra space around…the true keyword here,…and then I type in the semi-colon,…the C# Editor runs the format rules for this editor.…This also works when I press the close curly brace,…so I'll move down here and mess up my formatting,…then I'll type in a new curly brace here, on Line 32,…and you see formatted,…all the lines of code that were out of sync.…
- 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
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.