Monday, October 24, 2011

How to strip comments from a c# file

To strip single-line comments from a c# file, do the following:
  • Press {control} H to launch the quick replace dialog
  • In the "Find what:" dialog, enter //.*$
  • Expand "Find options"
  • Check use and select regular expressions
This doesn't work for multi-line comments, but it will rip out all the annoying MS template comments.

No comments:

Post a Comment