Compartilhar via


Advanced Search Operators in Search Expressions

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

By using advanced search operators, you can refine your search for content by creating more complicated search expressions from simpler ones. As the following table shows, these operators restrict the context in which a query runs.

Warning

You must enter advanced search operators with a final colon and no intervening space before the colon for the search engine to recognize them.

To search for Use Example Result
A term in the title of the topic title: title:binaryreader Topics that contain “binaryreader” in their titles.
A term in a code example code: code:readdouble Topics that contain "readdouble" in a code example.
A term in an example of a specific programming language code:vb: code:vb:string Topics that contain “string” in a Visual Basic example.
A topic that is associated with a specific index keyword keyword: keyword:readbyte Topics that are associated with the “readbyte” index keyword.

You can use the code: operator to find content about any of several programming languages, but it returns results only for content that is marked up with a specific programming language. The following table lists the programming languages that this operator supports:

Programming Language Use
Visual Basic code:vb

or

code:visualbasic
C# code:c#

or

code:csharp
C++ code:cpp

or

code:c++

or

code:cplusplus
F# code:f#

or

code:fsharp
JavaScript code:javascript

or

code:js
XAML code:xaml

See Also

Logical Operators in Search Expressions Full-Text Search Tips