This workshop will be retired on May 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introduction to Visual Studio!
You have completed Introduction to Visual Studio!
Preview
Learn how to use the search features.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
As the project gets bigger and spread out
among many files, it becomes more and
0:00
more important to be able to
navigate around the code.
0:04
Visual Studio provides tons of
features to make this easy.
0:07
Right now I'm gonna show you one that
you're sure to use, that's searching.
0:10
To search within a single file,
open the file you want to search and
0:14
press Ctrl+F on your keyboard.
0:18
This opens a tiny box in the upper
right corner of the editor
0:20
where you can type a search query.
0:24
Press Enter to run the search.
0:26
Press F3 on your keyboard to find
any other instances of the query.
0:28
There are lots of options packed
into this tiny search box area.
0:32
You can force it to match
the capitalization of your
0:36
query by toggling
the Match Case button here.
0:39
You can constrain it to
matching only whole words, or
0:42
you can enable regular
expressions in your search query.
0:44
Regular expressions is a big topic, but
they're very handy when searching for
0:48
a text pattern.
0:51
This drop down allows you to
change the scope of your search.
0:53
As you can see, you can select
a search within the code block,
0:56
the cursor it's positioned in, highlighted
selection, the current document,
0:58
all open documents, the current project or
the entire solution.
1:04
This other drop down beside the Find Next
button allows you to search for
1:08
all occurrences of the search
query within the scope selected.
1:12
This downward arrow expands the search
box so you can do a find and replace.
1:17
Two additional buttons also appear here.
1:22
If you click this button,
1:25
the next match found will be replaced with
whatever is in the second text box here.
1:26
This second button finds and
replaces all matches.
1:32
F3, and the arrow button,
1:36
will still just move to the next match
found without doing a replacement.
1:38
You can get even more search capabilities
by opening the Find and Replace window.
1:43
This provides a little larger areas
to work in, and more options for
1:48
searching multiple files.
1:52
Knowing the search capabilities of your
IDE makes exploring, debugging, and
1:54
refactoring code much smoother.
1:58
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up