Addin For removing comments

1 view
Skip to first unread message

santhosh vs

unread,
Dec 23, 2008, 12:20:23 AM12/23/08
to DotNetDe...@googlegroups.com
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 Site
http://everlovingyouth.googlepages.com
My Technical Blog
http://acutedeveloper.blogspot.com
Skype :santhoshnta
Orkut :everlovingyouth

Joe Enos

unread,
Dec 23, 2008, 12:28:12 AM12/23/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
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" <santhosh...@gmail.com> 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

santhosh vs

unread,
Dec 23, 2008, 12:30:14 AM12/23/08
to DotNetDe...@googlegroups.com
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.
--
My Web Site
http://everlovingyouth.googlepages.com
My Technical Blog

santhosh vs

unread,
Dec 23, 2008, 12:32:20 AM12/23/08
to DotNetDe...@googlegroups.com
I dont want to use any assembly decompiler for the purpose ,i think there should be some addin available .

Joe Enos

unread,
Dec 23, 2008, 12:47:06 AM12/23/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
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.

santhosh vs

unread,
Dec 23, 2008, 12:55:12 AM12/23/08
to DotNetDe...@googlegroups.com
No, No
:))

Just remove them all as i dont started "real" comment.
--
My Web Site
http://everlovingyouth.googlepages.com
My Technical Blog

Cerebrus

unread,
Dec 23, 2008, 1:20:52 AM12/23/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
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.
> > Orkut :everlovingyouth- Hide quoted text -
>
> - Show quoted text -

santhosh vs

unread,
Dec 23, 2008, 2:42:14 AM12/23/08
to DotNetDe...@googlegroups.com
Thanks Cerebrus i tried all and with regular expression find also. But you know the VS designer will left some comment. I know that there are many good code optimization addins exist for VS. I just asked if any one is using such add in that could remove all comments ( if possible excluding designer files )

Charles A. Lopez

unread,
Dec 23, 2008, 11:05:19 PM12/23/08
to DotNetDe...@googlegroups.com
I recall seeing this kind of request as a homework assignment.

I'm sure the code is somewhere out there.

If you're a good developer you could probably write the code yourself.

For the record, a comment would be anything contained between  a slash and a asterisk.

/* This is a comment */

And also the double slash //.

Are there any other comment delimiters?
--
Charles A. Lopez
charle...@gmail.com

Bachelor of Arts - Computer Science
New York University

Registered Microsoft Partner

New York City, NY

santhosh vs

unread,
Dec 24, 2008, 12:26:32 AM12/24/08
to DotNetDe...@googlegroups.com
I am saying about some code optimization addin and you are with comments oh what a ... ;(

Brandon Betances

unread,
Dec 24, 2008, 4:25:29 AM12/24/08
to DotNetDe...@googlegroups.com
heres a good add in...backspace key.

highlight and delete key.

space bar space bar space bar

Cerebrus

unread,
Dec 24, 2008, 10:36:54 AM12/24/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
LMAO !

On Dec 24, 2:25 pm, "Brandon Betances" <bbetan...@gmail.com> wrote:
> heres a good add in...backspace key.
>
> highlight and delete key.
>
> space bar space bar space bar
>
>
>
> On Wed, Dec 24, 2008 at 12:26 AM, santhosh vs <santhosh...@gmail.com> wrote:
> > I am saying about some code optimization addin and you are with comments oh
> > what a ... ;(
>
> > On Wed, Dec 24, 2008 at 9:35 AM, Charles A. Lopez <charlesalo...@gmail.com>
> > wrote:
>
> >> I recall seeing this kind of request as a homework assignment.
>
> >> I'm sure the code is somewhere out there.
>
> >> If you're a good developer you could probably write the code yourself.
>
> >> For the record, a comment would be anything contained between  a slash and
> >> a asterisk.
>
> >> /* This is a comment */
>
> >> And also the double slash //.
>
> >> Are there any other comment delimiters?
>
> >> On Tue, Dec 23, 2008 at 12:20 AM, santhosh vs <santhosh...@gmail.com>
> >> 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 Site
> >>>http://everlovingyouth.googlepages.com
> >>> My Technical Blog
> >>>http://acutedeveloper.blogspot.com
> >>> Skype :santhoshnta
> >>> Orkut :everlovingyouth
>
> >> --
> >> Charles A. Lopez
> >> charlesalo...@gmail.com
>
> >> Bachelor of Arts - Computer Science
> >> New York University
>
> >> Registered Microsoft Partner
>
> >> New York City, NY
>
> > --
> > My Web Site
> >http://everlovingyouth.googlepages.com
> > My Technical Blog
> >http://acutedeveloper.blogspot.com
> > Skype :santhoshnta

santhosh vs

unread,
Dec 25, 2008, 11:47:59 PM12/25/08
to DotNetDe...@googlegroups.com
Thank you very much !!
Reply all
Reply to author
Forward
0 new messages