When I read the OP's message, the same thing occurred to me - What's
the difference between a valid comment and one that needs to be
removed ? But on re-reading his post (and his subsequent response) it
is clear that he wants to get rid of all comments.

While it is true that old commented code does not form part of the
compiled assembly, distraction caused by such comments is quite a
subjective experience. I, for one, cannot stand commented code
intermingled with relevant code. Since most professional organizations
use some sort of SourceSafe system which keeps the versioned history
of each file, it becomes completely unnecessary to keep the old code
in the file itself. I find it to be a big readability hindrance.

To the OP,

I see no problem. You could simply write a macro that removes all
comments in your file. You could make it more dynamic so that it can
remove comments regardless of whether the code is in C# or VB. I think
I have done this sort of thing in VS 2003... but that was a while
back.

On Dec 23, 10:47 am, Joe Enos <[email protected]> wrote:
> So how would you expect the plugin to know the difference between a
> "real" comment and commented out old code?  My guess is that there's
> nothing out there that is smart enough to be able to do that
> automatically - but I suppose I could be wrong, so I won't say no with
> 100% certainty.
>
> But in my opinion, unless you're giving the code away to a third-party
> and want to protect those segments of code, don't worry about old
> commented-out stuff...If it's commented, then it's not part of the
> compiled assembly at all, and not hurting performance or anything
> else.  And I'm sure most developers won't be confused or distracted by
> old commented-out stuff in their projects - we're used to seeing stuff
> like that, and if nothing else, it may prove useful in the future if
> it gives insight into different ways of solving the same problem, even
> if those methods weren't used in the final release.
>
> On Dec 22, 10:30 pm, "santhosh vs" <[email protected]> wrote:
>
>
>
> > When i coded many of the sections used experimental codes which are
> > commented. I now want to remove all for the release . The detailed comment
> > for other developer is yet to done. I dont mean removing descriptive
> > comments.
>
> > On Tue, Dec 23, 2008 at 10:58 AM, Joe Enos <[email protected]> wrote:
>
> > > You may want to elaborate a little bit - you're looking to remove
> > > existing comments from code files?  Can you please explain why?  I
> > > can't imagine a scenario where that's a good idea.
>
> > > But even with a good reason, I don't know of anything that would do
> > > it...You can take the compiled assembly and dump it into Reflector,
> > > then export out a new VS project (there's a plugin for Reflector that
> > > will give you all the code files and the project files for a given
> > > assembly) - the code would be slightly different, and you'd still have
> > > the XML comments on declarations, but you'd get rid of all of the
> > > inline comments and have a reasonable facsimile of the rest of the
> > > code.  I definitely don't recommend this, but I figure I'd throw this
> > > out there...
>
> > > On Dec 22, 10:20 pm, "santhosh vs" <[email protected]> wrote:
> > > > Is there any addin available for .NET VS IDE 2005 for removing comments.
> > > I
> > > > used regular expression method but not so effective. Iam thinking for
> > > better
> > > > faster solution.
> > > > --
> > > > My Web Sitehttp://everlovingyouth.googlepages.com
> > > > My Technical Bloghttp://acutedeveloper.blogspot.com
> > > > Skype :santhoshnta
> > > > Orkut :everlovingyouth
>
> > --
> > My Web Sitehttp://everlovingyouth.googlepages.com
> > My Technical Bloghttp://acutedeveloper.blogspot.com
> > Skype :santhoshnta
> > Orkut :everlovingyouth- Hide quoted text -
>
> - Show quoted text -

Reply via email to