From the course: Visual Studio 2019 Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Get consistent names with code styles - Visual Studio Tutorial
From the course: Visual Studio 2019 Essential Training
Get consistent names with code styles
- [Instructor] In the previous video, we looked at applying code styles to insure that all code in our project matches our code standard. These same tools can be applied to naming conventions. For this example, we'll look in this DocumentInterface.cs file. You can see that on line seven, I've defined an interface called Document. On line 14, I defined a Book class that's implementing that interface. In the dot net world we prefer our interfaces to start with a capital letter I. So it'd be nice if the naming convention tool, the code style tool could flag this and it already is. If you'll look on line seven you'll see there's four dots under the word document. When I hover over that I see that I'm violating this rule, violation, naming rule violations, missing prefix I. I can also see this by going to view + error list. And I see that it shows up here as a suggested fix. Where's that defined, let's go take a look. If you look in the C sharp text editor under code style naming, you'll…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.