Friday, 26 August 2011

VB.NET Comment Remover

As a programmer I used to write lot of code along with the comments. Comments - the most important part of coding that help me understand my own code after few months when i forget about it’s working, logic… and look it like a stranger :)

Often we need to remove comments from code before forwarding it further because along with the comments we often leave there commented code that is not in use but we do not want to delete (due to any reason). There are two ways to do it.

1. First is to remove comments manually if the volume of comments is low.
2. Another way is to use regular expression replacement.

Either way require manual efforts, we have to go through each file and delete comment or run regex replacement. But what if application has hundreds of files?

To stop doing the bull work, i wrote a small tool to remove comments from entire application with few clicks. Download it here.

.NET 3.5 framework will be required to run this tool.

It can remove comment lines starting with comment character (') only. Inline comments are not supported in current version.

Further improvement/suggestions are welcome.