Leandro Bardelli
Leandro Bardelli

Reputation: 11598

How can I search only the code (excluding comments) in Visual Basic?

I'm looking for a way to find a string in my entire solution's code, i.e. just the effective code excluding the comments, in Visual Studio .NET 2008.

I'm working on Visual Basic code, so the comments in that language begin with a single quote '.

Upvotes: 0

Views: 383

Answers (2)

Ira Baxter
Ira Baxter

Reputation: 95402

Our Source Code Search Engine understands language element structures (e.g., knows what is a keyword, what is comment, a number, etc.) and will allow you formulate complex queries in those terms. Because it understands language structure, it can do searches that are not confused by whitespace or comments (unless you insist).

Upvotes: 0

PersonalNexus
PersonalNexus

Reputation: 1302

What you are looking for is probably Find Symbol (ALT+F12). This should limit your search to symbols in your code, though you probably cannot search for keywords this way. You can tell it to look in your entire solution and even use Match substring if that's what you want.

Upvotes: 3

Related Questions