>> Hi. This video is a whirlwind tour of
Visual Studio productivity with.Net.
Now, we have full length hour-long tours of all this.
So I'm just going to see how many features I can
cram into hopefully less than five minutes.
Let's dive in. First is Visual Studio Search or Control Q.
Here, I can find what keyboard
by names I can set in Visual Studio.
We've recently added ReSharper in
Visual Studio Code so you don't have to break your muscle memory.
You can also search for
obscure options in "Tools Options" using Control Q.
So this is me easily looking at the code style.
Speaking of easy navigation,
Control T is our go-to all navigations.
You can easily view
recent documents and you get to see a preview of them.
You can also navigate to file types,
numbers, symbols, and declarations.
Speaking of navigation, you'll
Shift F12 to open "Find All References".
You can filter "Find All
References" to only read and write references.
You can also use go to definition or Control click,
and you can always navigate backward using Control minus.
Next, you can peek definition with Alt F12.
You can always run tests with
Control RT or use the CodeLens icons.
In the Test Explorer, you can easily
filter tests to only failed tests,
for example, with the new filter buttons.
You can also completely organize
your group by and hierarchy to whatever you want.
So now it's organized by project namespace and glass.
So let's dive into some code fixes.
Notice at the top of my file,
I don't have a Newtonsoft.Json reference.
Visual Studio can now add
missing usings for a block of copy and pasted code.
So now, when I accept that code vix,
Newtonsoft.Json was added to the top of my file.
I can also get completions for types that I don't have imported,
using completion for unimportant types in my IntelliSense list,
and it will automatically add
that reference at the top of my document.
Another refactoring is add null check.
Again, all these refactorings are accessed through controlled dot.
Next I have an invert and if-else statement.
Just ways to easily refactor
your code so it looks the way you want it to.
Let's say in re-architecting my solution
and dragging and dropping files into new folders,
I can easily sync my namespace with control dot.
I can also extract an interface to the same files.
So this is for when I have a type
but I actually want to use it in many different places,
I want to go ahead and extract an interface.
If I didn't promote all of
the members to be a part of that interface,
I can actually pull a member up at anytime.
Now, I have some pretty inconsistent code style
and use of var versus explicit type throughout my files.
I can easily enforce CodeStyle using editor config,
which is a file that will live at the root of my project.
So if I go ahead and search for the var roles,
I can select all of these with
next matching caret or shift all dot.
I can change the severity from silent to give me an air.
So now when I go back to my code editor,
I will get red squiggles where I could be using the explicit type.
I can clean up all of these at once
using Code Cleanup or control K,
E. So that was navigating,
refactoring, testing, and cleaning up your code.
Thanks for watching the whirlwind tour
of Visual Studio productivity.