Exclude comments when searching in Visual Studio

前端 未结 3 1795
無奈伤痛
無奈伤痛 2020-12-14 05:39

Is there a way to perform searches (Find / Find in Files) in visual studio that will exclude matches in comments? While sometimes it is useful, other times it is the opposi

3条回答
  •  生来不讨喜
    2020-12-14 06:40

    I don't believe it's an option in VS. You could try regular expressions, but those are limited by how creative you can be. It seems like it would be not entirely difficult to search for lines not beginning with // using a regex.

提交回复
热议问题